Hi,
I am using softwareserial for 2 Unos to speak to each other. One of them, the 'master', has a joystick and the other, the 'salve', has a tilt/pan camera unit and {future} other sensors. I will be using the master to send joystick position information to the slave along with requests for other sensor data. Although crude, I have a working system.
I have found very basic examples of code for each of the individual items - reading a joystick, controlling a servo, and communication of the 2 boards via softwareserial. What I have put together is a command string that consist of a command and associated data. For example, to move the camera the command string is "C1_192|40!". "C1" is the command to move the camera, "_" is a delimiter, "192|40" are the servo pan and tilt values, "|" is a delimiter, and the "!" is end-of-message indicator. My system will have various Cx commands and each, depending upon what that command is, could have a data string following it.
As I said, I have something that is working and, before going forward, I would like to compare what I have done to other solutions. So, what I am looking for is more practical sample code of sending and parsing various messages (move a servo, read a sensor, etc) from the master to the salve and back. Something more real world than the "Hello World" type of examples I am finding. I know how I have done it and I want to compare that to the accomplishments of others - maybe, and quite possibly, I would see something that I could learn from and would be an improvement to my implementation.
So, what I am asking is...does anyone know of any sample/example code that may be a good read for me? Links to them would be greatly appreciated.
Thanks,
Randy