my first robot

Posted on 24/04/2009 by patrickmccabe
Modified on: 13/09/2018
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

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 ...


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
Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post