I am using Arduino uno board with a Adafruit thermal printer with the Adafruit_Thermal.h library and have set the code page to the Cyrillic characters but I can only print one character at a time using the write func and entering the ASCII value as a parameter. How can i print longer messages at a time.
I am using this code and when i run it, it dumps all the characters in the table including the Cyrillic ones, so i know that the printer supports them
#include <Adafruit_Thermal.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5,6);
Adafruit_Thermal printer(&mySerial);
void setup() {
// put your setup code here, to run once:
pinMode(7, OUTPUT); digitalWrite(7, LOW);
mySerial.begin(9600);
printer.begin();
printer.setCodePage(CODEPAGE_MIK);
dump();
}
void dump() {
uint8_t major, minor, c;
printer.println(F(" 01234567 89ABCDEF"));
for(major=0; major<16; major++) {
printer.print(F(" "));
printer.print(major, HEX);
printer.print(F("- "));
for(minor=0; minor<16; minor++) {
c = (major << 4) | minor;
if(c < 32) c = ' '; // Skip control codes!
printer.write(c);
if(minor == 7) printer.print(F(" "));
}
printer.println();
}
}
void loop() {
}