Sending ASCII control characters using the serial monitor

Hi!
I'm using an Arduino for interfacing with a parallel interfaced receipt printer. I'm building a serial to parallel adapter, but I'll need to send ASCII control characters in order to change font size, invert text an so on. These aren't typable characters..

Is there a way to send control characters to the Arduino using the serial monitor?
User manual for the receipt printer is attached.

Thanks! :slight_smile:

mt150.pdf (1.14 MB)

Actually, the sequences are typable... '-' is underline, etc.

So what should the actual keypresses be? I'm using a mac, and if i write " esc'-' " (without the "" quotes), it's just printing it as a text string

hansibull:
So what should the actual keypresses be? I'm using a mac, and if i write " esc'-' " (without the "" quotes), it's just printing it as a text string

A Mac has no escape key? LOL, upper left corner. I don't mean to mock, it's just that I almost believed it.

I got it working using another terminal program. Macs do got an esc key. However, it doesn't seems like any esc + [some char] works with the arduino ide..

hansibull:
I got it working using another terminal program. Macs do got an esc key. However, it doesn't seems like any esc + [some char] works with the arduino ide..

Yes, but your print app probably won't use the serial monitor or any monitor, for that matter. Since it's just for testing, use a terminal emulator program.

You could program the Arduino to convert some sequence of regular characters into the ascii code needed by the printer.

For example if the Arduino received it could output 0x1B

...R