my first robot
my robot is using the picaxe18 power board from sparkfun.com. he turns both ways and decides which way is better to go and goes that way
here is my code:
symbol dangerlevel= 84
Main:
readadc 0,b0
if b0<dangerlevel then
low 4: high 5: low 6: high 7
goto main
else
label_1: readadc 0,b0
end if
high 4: low 5: high 6: low 7
if b0>75 then
goto label_1
else
low 4: high 5: high 6: low 7
pause 500
readadc 0, b0
high 4:low 5: low 6: high 7
pause 1000
readadc 0,b1
low 4: high 5: high 6: low 7
pause 500
end if
if b0<b1 then
low 4: high 5: high 6: low 7
pause 500
goto main
else
high 4:low 5: low 6: high 7
pause 500
end if
goto main
navigate around using sharp ir
- Actuators / output devices: 1:58 ratio twin tamiya gear motor box
- Control method: autonomous
- CPU: picaxe 18x
- Power source: 4 AA batteries
- Programming language: Picaxe basic
- Sensors / input devices: Sharp IR
- Target environment: inside