Go Down

Topic: send and receive HEX over TTL (Read 684 times) previous topic - next topic

Dawiinci

I will post the code shortly, although it is really getting big. Hopefully this will help to understand what I want.

Thanks for your patience. 

Dawiinci

I attached the sketch for better reading.

It is basically the bridge example for the Arduino Yun with some modification to respond to commands like:
http://IP/command/1/1

The reply for the commands except for status will be the same as the sent command to check if received correctly. Status as well as other information will give a specific code to say what it is doing. This will be returned over http (switch case) but is not yet implemented. Actually I plan to do it the same way as I give out the temperature, except it will be a String.

For the receiving part I need some ideas. Because I want to use the result of a reply right after sending in the same function I thought it makes sense to wait 10 seconds before reading instead of reading in the loop.

I'm open for any suggestions as well as for corrections.
Thanks

Go Up