12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When a ranging command in cm is given, you would only need to read register 2 when themeasured distance would be over 255 cm.TIME / Distance to ObjectSRF02BURSTOBJECTREFLECTIONSPEED OF SOUND =+/- 320m/<strong>se</strong>cTIME / Distance back to<strong>se</strong>nsorSTEP 1: ActiveSRF02 to give aburst by writing80, 81 or 82 inthe commandregisterSTEP 2: Wait65m<strong>se</strong>c to besure that thesound wave hasreflected andarrived back atthe <strong>se</strong>nsorSTEP 3: Readthe rangingresult in index 3(for results 256)Locations, 4 and 5, are the 16bit unsigned minimum range. This is the approximate clo<strong>se</strong>strange the sonar can measure to. See the Autotune <strong>se</strong>ction below for full details.CommandsThere are three commands to initiate a ranging (80 to 82), to return the result in inches,centimetres or micro<strong>se</strong>conds. Another <strong>se</strong>t of three commands (86 to 88) do the same, butwithout transmitting the burst. The<strong>se</strong> are u<strong>se</strong>d where the burst has been transmitted byanother sonar. It is up to you to synchronize the commands to the two sonar's. There is acommand (92) to transmit a burst without doing the ranging and also a <strong>se</strong>t of commands tochange the I2C address.Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 67

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!