Hi all, I am new to the forum and Arduino - so apologies for any mistakes ahead of time.
I am trying to write a small program that will control a set of relays. I would like it to listen for any incoming characters in the serial port. when one arrives put it into a buffer and wait for the next one until it has a total of 6 characters. It would be triggered by an end of frame character to check 6 characters back that there was a valid start of frame character. this would validate that all the information made it.
At this point I would like to process the frame using switch case statements. The only twist I have is that based on the first two characters of the frame, I may want to echo back the remaining 3 characters back to the serial port. does this seam possible?
could you guys please suggest some pointers or sample programs that I might be able to expand to accomplish this?