Serial buttons

Hi there,

I have am trying to use a Textstar LCD display form Cat's Whiskers and was wondering the best way to set up a menu that could jump to sub menus on the push of a button. The display has four buttons on the side that each send an uppercase character (A, B, C or D) to the arduino when pressed and then a lower case character (a, b,c or d) when released.

What is the best way to look for these presses then do something depending which one was pressed?

I was thinking of an if and elseif statements or maybe interuppts.

To give you an idea what the project is about, I am making a Timelapse Dolley and the display will help me set up the timelapse to be taken so set up timelapse, then move the motor to start point then to the end point then set time for lapse then go.

If anyone know where a good tutorial trying to dot he same sort of thing is then that would also be very helpful?

Thanks,

Matt

What is the best way to look for these presses

Seems to me that you'd know that, if you know that the switches send specific information when pressed or released.

I was thinking of an if and elseif statements

Suitable, after you've read the data.

or maybe interuppts.

Or not.

What about a link to the datasheet for the device you are thinking of using?

How does it send characters to the Arduino?

...R

Assume you receive a character per button press, then check serial port in a while loop. Then use if statement to decide what submenu to print etc.