Hello,I am using a 2 inch thermal printer with arduino uno r3. I used adafruit library for thermal printer i.e. "Adafruit_Thermal.h". With this library the text (Strings)are printing fine, but when there comes a bitmap image, the printer just prints some garbage dots. Guide me how to fix it.Thanks

// The following function calls are in setup(), but do not need to be. // Use them anywhere! They're just here so they're run only one time // and not printed over and over. // Some functions will feed a line when called to 'solidify' setting. // This is normal.

Thanks. The PDF icon doesn't work, but it did lead me to another question. Are you driving the signal levels on that flat cable directly with your arduino or using an interface board in between? Your code doesn't look like it is driving everything directly.

Looking at the datasheet and looking at the adafruit library, it doesn't look like the library is directly compatible with your board. To get into bitmap mode, you need to send a specific command. The reason it works with everything else is because the printer is set at defaults at power up and accepts your text.

Page 14 of the datasheet describes how to use the bitmap mode. You have to send ESC (27) then * (42) then a mode of 8 or 24 dots, and then your actual bitmap information. I don't see the library sending all those commands.

This was only a quick look, but I don't see it controlling the printer in the same way as the datasheet. However, some of the commands are the same, but those are for text stuff. The barcode and bitmap routines are not doing things the same way.

Can you tell me how to send the command???I am sending the commands as:printer.writeBytes(27,42,1);//ESC * mprinter.writeBytes(100,2);//n1 n2for(int i==0;i<=200;i++)printer.writeBytes(data);//d1 d2 .... dkwhere the data is stored in program memory in the same format as in adafruit library example.The code is successfully compiled and uploaded on arduino but the output is same as I have shown you above.(The data is also same)I am stuck here...