Expect like libraries for arduino?

Hello all,

I'm looking to create a simulator of a serial device, and I was wondering if anyone knew of any libraries for arduino that are like expect, or even better if anyone has gotten expect to run on the arduino.

The goal is basically to look for start characters [1...n] and end characters [1...n] and then process the message once a full one is received. Additionally, is it safe to hook up the serial port pins on the mega directly to a device (as long as the device is sending out 5v signals)?

Thanks! Regards, Chris

As long as the signals do not go higher than Vcc (5v for Uno and Mega) or below ground, you can connect the serial directly to the Arduino, sure. Also you need to tie the grounds together.

I have no idea what "expect" is, but I'm sure there's code around to do things like that with serial - it doesn't sound hard to write oneself either.

Read this: