Hi guys,
I want to connect EV3 IR and ultrasonic sensors to my Arduino. Unfortunately I could not find any good documents describing how to use/control these sensors.
Till now the link below is the best site I found.
http://ev3.fantastic.computer/doxygen/UartDriver.html
Unfortunately it is not enough to understand the synchronization between sensors and the Host.
This is the description how it should be done:
- Enable UART communication
- Setup UART for LOWEST_BITRATE
- Setup hardware buffers
- Sync clocks
- Wait for receive of byte <-.
- If CMD is received skip to send INFO |
- Check byte against SYNC |
- If not SYNC increase UART clock --'
- Send sync feedback
- Exchange informations
- Receive command data
- Send command data (type,modes,speed, etc)
- Receive info data
- Send info data (name,scaling,data format, etc)
- Receive acknowledge
- When finished info send acknowledge
- Switch to valid communication speed
How can I know that the received byte is command or sync byte. It can be the payload byte with the same value as for command and sync.
Any comments please?
I already spent a loot of time trying to find useful information.
Thank you very much.