# Thermal Printer controlled by a push button

**URL:** <https://forum.arduino.cc/t/thermal-printer-controlled-by-a-push-button/1247640>\
**Category:** General Guidance\
**Created:** [April 14, 2024, 4:19pm UTC](https://forum.arduino.cc/t/thermal-printer-controlled-by-a-push-button/1247640 "2024-04-14T16:19:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [April 14, 2024, 4:44pm UTC](https://forum.arduino.cc/t/thermal-printer-controlled-by-a-push-button/1247640/3 "2024-04-14T16:44:28Z")

</div>

Look at the Arduino File/Example/02.Digital/Button example, and consider putting much of the stuff in your setup() function into a printLineOnTheThermalPrinter() function per

> [@Planning and Implementing an Arduino Program](https://forum.arduino.cc/t/planning-and-implementing-an-arduino-program/252364):
>
> From what I can see there are many tutorials about doing specific tasks with an Arduino but I have not come across any that guide a newcomer through the process of planning and implementing a program to make it easy to understand and debug. The following 9 posts in this Thread are an attempt to fill that gap. ...R

You might modify the Button example to also call a printLineOnTheThermalPrinter() function ehrn the button is pressed.

---

_[View the full topic](https://forum.arduino.cc/t/thermal-printer-controlled-by-a-push-button/1247640)._
