I've been able to connect to the printer and print a few things successfully with code such as:
p = Adafruit_Thermal('/dev/serial0', 19200, timeout=3) p.print("Hello World!")
That works perfectly.
However, it appears that I also am getting other data over
Whenever I start up the script that runs my code, the printer feeds for several seconds, even without any code being run. And occasionally, when things are happening on the pi itself, the printer will print out some relevant data. For example, as I was shutting the pi down, the thermal printer printed out:
[20717.652110] reboot: Power down
I assume this is likely something to do with something else communicating with
/dev/serial0, however I'm not sure how to find out what it is and stop it.
I'm brand new to the world of pi, and most of this hardware stuff as well, so I'm kind of scratching my head at how to stop this unwanted information being printed. I'm considering sticking a transistor in and hooking it up to another GPIO pin, so it only prints when I want it to, but I'd definitely prefer an actual solution over a band-aid.
Does anyone know what might be causing this, or if not, how I could find the source of the interference?