Dear friends,
I am able to print texts, barcodes on the (Serial/TTL) Thermal Printer from the PIC MCU using the following similar commands.
putch(0x1B); // ESC
putch(0x2A); //*
puts("Welcome to Edaboard \r\n");
etc.
but struggling to print the bitmap. I like to bring one important point to your knowledge that I am even struggling to find out the proper/correct ESC/POS commands for my printer. Some documents say to use this command to set the printer to start bitmap : "0x12 *" (DC2 *). Some other documents say "0x1B *" (ESC *). I tried both commands. But it prints only characters not image. Same characters printed even after If I don't use those commands. No datasheet provided along with the printer. I went through the arduino library files on github.
The RP203 thermal printer features automatic paper detection, automatic memory printing abilities, Easily connects to microcontrollers, No ink is needed it uses heat-sensitive ribbon technology for durable prints.
Really I did extensive search on the internet for last 3 days to get suitable ESC/POS command set for example downloaded command set from EPSON site and other sources. But commands are different for different models. Even i tried all the command set but i can't succeeded. For your information, I tried with my seller too but they also said they don't have command set. That's why I come here to get your help. After the suggestion of FvM, i tried again on the internet. I found (its really miracle for me) only one pdf document which was same as FvM sent here.
Anyway, finally i got the command set from FvM now.
Thanks to FvM and you all.
Actually i tried with the same bitmap command set mentioned in the document earlier but no bitmap printed. I am still trying to solve the issue. If you can help, it would be very helpful.
Wow. I did a single search ... and the document was the second hit. 3 seconds.
We won't write code for you, we won't do your job.
But we like to help you to rectify your mistakes.
But for this you need:
* to show your code
* give additional informations like wiring, power supply...all that is required to make a printer to work
* tell what you expect
* tell what you get/see instead
Hi all,
I finally abled to print bitmap image using the command
GS v 0 xL xH yL yH
Now the image prints on left justification. I need to be centered it. So I tried the command
ESC a 1
(0x1B 61 0x31)
But not succeeded. Any suggestion would be appreciated. Advance thanks.
Files added.
Vibrant2020
--- Updated ---
The sequence I followed :
Code C - [expand]
1
2
3
4
// To align center
putch(0x1B);// ESC
putch(0x61);// a
putch(0x31);// 1
Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Print bitmap image
putch(0x1D);// GS
putch(0x76);// v
putch(0x30);// 0
putch(0x30);// m = 0
putch(0x1F);// xL = 248 pixels /8 = 31
putch(0x00);// xH
putch(0xB4);// yL = 180 pixels (height)
putch(0x00);// yHfor(long i =0; i <5580: i++){
putch(data[¡]);}puts("\n\n");