Thermal Printer DTR Question


I have a question about thermal printers. Normally if using w/ with an Arduino, you can set a DTR pin, which allows you to bypass the buffer on the printer.

I noticed the libraries in current use for particle don’t have a code block for dealing with DTR. Has anyone tried doing the DTR buffer bypass with spark? Any thoughts on approaches to trying it?

1 Like

@wandering_n, the newest Adafruit library would need to be ported, which should be easy. The DTR is sampled with digitalRead() prior to sending anything to the printer and the library includes a timeout waiting on the DTR in case it is stuck.

I was able to copy the Adafruit library into a new project in CLI and with few modifications (remove SoftwareSerial and use Serial1 and add DTR pin) to an example, it compiled just fine.

1 Like