My robot consists of 2 motots, 2 bumper switches, a picaxe axe023, and a power source. It's working well, however it only backs up and turns when the bumper switch is released. This presents a problem, when the robot his a wall it does not back up and turn unless the switch is released. How would I fix this?
Here's my code:
Here's my code:
Code:
symbol fw = 20
symbol bc = 200
do
if pin3 = 1 then
low 1
high 0
low 4
high 2
pause 1000
high 1
low 0
low 1
high 0
pause 500
else
high 1
low 0
high 4
low 2
endif
loop