Hello guys , i am stuck on something so i was wondering if somebody could help me .
I am working on a thermal printer Epson M-T532 and i managed to print and some other options , but i am stuck on selecting page mode and print vertically "horizontal" its like a landscape mode , i searched everywhere and i managed to find the ESC L command but unfortunately it does not work also i tried other things and no luck can someone please help me ?
THis is how i used the ESC L command , i have used other commands the same way and they worked
ivanh23:
Hello guys , i am stuck on something so i was wondering if somebody could help me .
I am working on a thermal printer Epson M-T532 and i managed to print and some other options , but i am stuck on selecting page mode and print vertically "horizontal" its like a landscape mode , i searched everywhere and i managed to find the ESC L command but unfortunately it does not work also i tried other things and no luck can someone please help me ?
THis is how i used the ESC L command , i have used other commands the same way and they worked
mySerial.println("\x1B\x4C");
donno the full command sequence but if you are sending bytes (not the ASCII character) why are you not using serial.write to sent then i.e:
mySerial.write(0x1B);
mySerial.write(0x4C);
Does the command sequence require at CR/LF hence the use of println?
Page 32 there is a pciture and some programming code that i dont understand , the picture is that what i am trying to get , can you suggest something ?
I edited my answer it does not work the example you showed me.
Page 32 there is a pciture and some programming code that i dont understand , the picture is that what i am trying to get , can you suggest something ?
I edited my answer it does not work the example you showed me.
if this is the example you are taking about, the code pretty straight forward, just need to translate it!
so for example:
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR&(180);← Set horizontal and vertical motion units
would probably be something like
Serial.write(0x1D);
Serial.print("P");
Serial.write(180);
Serial.write(180);
//...you get the gist I hope! :)
OR if you wanted all in HEX as in your OP then somthing like this maybe: mySerial.println("\x1D\x50\xB4\xB4");
As mentioned the only think I am still unclear is if you need a carriage return/linefeed at the end of each command.
if yes then just add either Serial.print("\r"); OR Serial.print("\n"); OR Serial.print("\r\n");
sherzaad:
As mentioned the only think I am still unclear is if you need a carriage return/linefeed at the end of each command.
If I remember my BASIC (it's been a long time since I sold my BBC Micro) the PRINT command implicitly throws in a CR and/or LF by default. So even though they're not mentioned I think it's worth experimenting to see if they're needed.
Yes you should definitely try. FF is the form feed character. Once upon a time it was how you made a printer start a new page. It's ASCII character 12 or 0C in hex.
Well thats the thing , i am going blind folded with the commands , there is no data sheet for this model , other commands work , i guess this ones should work too
Have you had it working, just printing line by line in standard mode (ie. not page mode)?
I think the best approach is to pull apart the BASIC example in the PDF and make the Arduino a similar series of bytes to the printer, to see what works and what doesn't.
Luckily the code is quite well commented and explained in some detail on the following pages of the PDF.
Hi there, Hi Ivanh23, I read about your question for using EPSON M-T532 on Arduino,
can you please share your connection between printer and Arduino?
thanks