Walking Breadboard

Rick100

Senior Member
#6
Hello erco,

I really liked your walking breadboard and had to build one. It has IR control. The IR remote is a nice Sony universal teachable unit, I got on clearance at Wally World for $5. The bot is not as clean as yours but here's the video.

https://www.youtube.com/watch?v=_UnITl-VYx0

The parts list:

Picaxe 08M2
SG90 9 gram servo
170 point breadboard
3 AA battery box with switch
TSOP38238 IR receiver
paperclips
3/8 square dowel rod
hot glue

Here's the code.

Code:
[color=Green]'walking breadboard by erco
'IR control uses Sony universal remote set for Sony VCR
'servo on C.2 (leg 5)
'ir receiver on C.1 (leg 6)[/color]

[color=Navy]#picaxe [/color][color=Black]08m2[/color]
[color=Navy]#no_data
#terminal 4800[/color]

[color=Green]'constants[/color]
[color=Blue]symbol LEFT_ADJUST [/color][color=DarkCyan]= [/color][color=Navy]20[/color]
[color=Blue]symbol RIGHT_ADJUST [/color][color=DarkCyan]= [/color][color=Navy]20[/color]

[color=Blue]symbol CENTER_POS [/color][color=DarkCyan]= [/color][color=Navy]137[/color]

[color=Blue]symbol LEFT_POS [/color][color=DarkCyan]= [/color][color=Blue]CENTER_POS [/color][color=DarkCyan]+ [/color][color=Blue]LEFT_ADJUST
symbol RIGHT_POS [/color][color=DarkCyan]= [/color][color=Blue]CENTER_POS [/color][color=DarkCyan]- [/color][color=Blue]RIGHT_ADJUST
symbol STEP_PAUSE [/color][color=DarkCyan]= [/color][color=Navy]250[/color]

[color=Green]'variables[/color]
[color=Blue]symbol [/color][color=Purple]irCode [/color][color=DarkCyan]= [/color][color=Purple]b3[/color]

[color=Green]'------------------------------------------------------

      [/color][color=Blue]pause [/color][color=Navy]2000

      [/color][color=Blue]sertxd([/color][color=Red]"RESET"[/color][color=Black],[/color][color=Navy]13[/color][color=Black],[/color][color=Navy]10[/color][color=Blue])

      servo c.2[/color][color=Black],[/color][color=Blue]CENTER_POS
      pause [/color][color=Navy]1000[/color]

[color=Black]main:
      [/color][color=Blue]irin [PLAIN][[/PLAIN][/color][color=Navy]20[/color][color=Black],main[/color][color=Blue][PLAIN]][/PLAIN][/color][color=Black],[/color][color=Blue]C.1[/color][color=Black], [/color][color=Purple]irCode
      [/color][color=Blue]if [/color][color=Purple]irCode [/color][color=DarkCyan]= [/color][color=Navy]66 [/color][color=Blue]then gosub [/color][color=Black]straightAhead   [/color][color=Green]'up button
      [/color][color=Blue]if [/color][color=Purple]irCode [/color][color=DarkCyan]= [/color][color=Navy]98 [/color][color=Blue]then gosub [/color][color=Black]leftTurn        [/color][color=Green]'left button
      [/color][color=Blue]if [/color][color=Purple]irCode [/color][color=DarkCyan]= [/color][color=Navy]97 [/color][color=Blue]then gosub [/color][color=Black]rightTurn       [/color][color=Green]'right button[/color]

[color=Blue]goto [/color][color=Black]main[/color]

[color=Green]'----------------------------------------------------------[/color]
[color=Black]straightAhead:
      [/color][color=Blue]servopos c.2[/color][color=Black],[/color][color=Blue]LEFT_POS
      pause STEP_PAUSE

      servopos c.2[/color][color=Black],[/color][color=Blue]CENTER_POS
      pause STEP_PAUSE

      servopos c.2[/color][color=Black],[/color][color=Blue]RIGHT_POS
      pause STEP_PAUSE

      servopos c.2[/color][color=Black],[/color][color=Blue]CENTER_POS
      pause STEP_PAUSE
      
      return[/color]
[color=Black]leftTurn:
      [/color][color=Blue]servopos c.2[/color][color=Black],[/color][color=Blue]LEFT_POS
      pause STEP_PAUSE
      
      servopos c.2[/color][color=Black],[/color][color=Blue]CENTER_POS
      pause STEP_PAUSE

      return[/color]
[color=Black]rightTurn:
      [/color][color=Blue]servopos c.2[/color][color=Black],[/color][color=Blue]RIGHT_POS
      pause STEP_PAUSE
      
      servopos c.2[/color][color=Black],[/color][color=Blue]CENTER_POS
      pause STEP_PAUSE
      
      return
      
      [/color]
Thanks,
Rick
 

erco

Senior Member
#7
Fantastic, Rick100! Thanks for sharing that. I've been a fan of your robot arms (Tic tac toe and Towers of Hanoi) for some time.

This bot is described in soon-to-be-published part 3 of my PICAXE series in SERVO magazine. It's great to see that you made yours work just seeing the videos. Yours is only the second of this style bot to walk the earth, hopefully others will follow. BTW, the pace of my articles is purposefully slow for beginners. I didn't quite get to IR control of this bot, but I threw it out as a challenge ("it shall be left as an exercise to the reader") in the closing lines of the article since I did cover general IR control in part 2. So you're way ahead of the class!

Thanks again for building and posting. As simple as this little bot is, it's surprisingly fun to see it bumble along.

I made a Turtle-Bot which walks similarly but faster on 4 legs, IR control here:

 
Top