Tigran Posted July 15, 2015 Posted July 15, 2015 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. Quote
goggel Posted July 15, 2015 Posted July 15, 2015 (edited) The best thing to do is probably look into how it's been done by ev3dev and others. http://www.ev3dev.org/docs/sensors/#supported-sensors seems to be a good start point for further details. Edited July 15, 2015 by goggel Quote
lee82gx Posted July 17, 2015 Posted July 17, 2015 I have downloaded the source codes from below and one or two of the packages do detail what you are looking for: http://www.lego.com/en-us/mindstorms/downloads Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.