Let's Make Robots!

EEPROM code for iCon...

This is a simple code that takes values from a pot and adc channel, writes it to the eeprom, then plays back these positions to a servo. This is a very basic version of what I use to prerecord moves for walter's head.


i2cslave %10100000, i2cslow, i2cbyte

for b1=0 to 255 step 1
readadc 1,b2
gosub writeit
gosub servomove
next b1
goto playback

writei2c b1,(b2)

pause 3000
for b1=0 to 255 step 1
readi2c b1,(b2)
gosub servomove
next b1

servo 0,b2
pause 50

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Thanks, i have some experimenting ahead of me.