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.

}LCD03_SET_CURSOR(55);LCD03_WRITE_BYTE(LFT_WHEEL);if (LF_L){LFT_WHEEL = 135;RGT_WHEEL = 150;}el<strong>se</strong> if (!(LF_C)){if (!(LF_R)){LFT_WHEEL = 160;RGT_WHEEL = 130;}el<strong>se</strong>{LFT_WHEEL = 150;RGT_WHEEL = 135;}}el<strong>se</strong>{LFT_WHEEL = 150;RGT_WHEEL = 150;}I2C_SEND_MESSAGE(0xB0,0,LFT_WHEEL);I2C_SEND_MESSAGE(0xB0,1,RGT_WHEEL);}}if (LF_L){LFT_WHEEL = 135;RGT_WHEEL = 150;}el<strong>se</strong> if (!(LF_C)){if (!(LF_R)){LFT_WHEEL = 160;RGT_WHEEL = 130;}el<strong>se</strong>{LFT_WHEEL = 150;RGT_WHEEL = 135;}}el<strong>se</strong>{LFT_WHEEL = 150;RGT_WHEEL = 150;}I2C_SEND_MESSAGE(0xB0,0,LFT_WHEEL);I2C_SEND_MESSAGE(0xB0,1,RGT_WHEEL);}<strong>Proton</strong> robot developer’s notes:The<strong>se</strong> 3 line follow <strong>se</strong>nsors work perfectly – only if they are at a certain distance fromthe ground that they need to ‘<strong>se</strong>e’. Be aware of this exact distance. Any distancebetween 1 and 5 mm should do fine. A <strong>se</strong>nsor that hits the surface will not detectanything.Your first program should always be with one <strong>se</strong>nsor, afterwards u<strong>se</strong> 2 or 3 <strong>se</strong>nsors.Always u<strong>se</strong> some kind of indication of the ‘state’ of the u<strong>se</strong>d line <strong>se</strong>nsors. U<strong>se</strong> led’s orthe LCD.The<strong>se</strong> <strong>se</strong>nsors u<strong>se</strong> only Infra-red light for the measurement. Be aware that sunlighthas quite a bit of IR spectrum and can so corrupt the measurement.Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 82

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

Saved successfully!

Ooh no, something went wrong!