Jump to content

Recommended Posts

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...