I have written a very simple program in python to print the text value in the mini thermal receipt printer adafruit.
Code:
# On a CircuitPython microcontroller:
import board
import busio
import serial
#uart = serial.Serial("/dev/ttyUSB0", baudrate=19200, timeout=3000)
#import serial
uart = serial.Serial("/dev/serial0", baudrate=19200, timeout=3000)
import adafruit_thermal_printer
ThermalPrinter = adafruit_thermal_printer.get_printer_class(2.69)
printer = ThermalPrinter(uart)
#print(printer)
printer.print("Hello from CircuitPython")
printer._wait_timeout()
printer.feed(2)
Expected Output:
The thermal printer prints Hello from CircuitPython
.
Actual Output:
Any help to resolve this issue must be appreciated.