escape characters via serial

Hi,

I'm controlling a serial printer from arduino, now it works perfect but i need to send it escape characters to controll some especific features of the printer. Anybody can show me a way to do that?

i need to send "ESC i"

thx

There are details on how to send data via serial output: http://arduino.cc/en/Serial/Print

While there are several methods, one would be:

int esc = 27; //ascii escape key . . . . Serial.print(esc, 'i');

Lefty

You can also embed 27 in a string:

Serial.print("\x1B" "i");

Thanks, works perfect!