3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Build a Very Small Robot: Make The World's Smallest Wheeled Robot With A Gripper.

Step 6Robot Controller Software

Robot Controller Software
Here is the software program for the Picaxe microcontroller. It sends pre-programmed sequences to the Polulu servo controller which moves the magnet in 3d space to control the robot. With slight modifications, it could also be used to program a Basic Stamp two.

To program the Picaxe I found it necessary to disconnect Pin 3 (serial output) from the servo controller. Otherwise the program would not download from the PC. I also found it necessary to disconnect pin three from the servo controller when turning the circuits on, to prevent the servo controller from locking up. Then, after a second or so I reconnected pin 3.


'Program for R-20 magrobot pickup sequence using a polulu servo controller

high 3 'serial output pin
pause 7000

'set to 0 position
serout 3,t2400,($80,$01,$04,1,35,127) 'position s1 13-24-35 counter-clockwise
serout 3,t2400,($80,$01,$04,0,35,127) 'position s0 c-clock
pause 7000

'level magnet
serout 3,t2400,($80,$01,$04,3,23,127) 'position mid
pause 1000

'move forward long servo1
serout 3,t2400,($80,$01,$04,1,21,127) 'position clockwise
pause 1500

'grip down
serout 3,t2400,($80,$01,$04,3,26,127) 'position down
pause 2000

'close grip
serout 3,t2400,($80,$01,$04,2,25,1) 'slow speed clock
pause 50

serout 3,t2400,($80,$01,$00,2,0,127) 'stop servo 2 rotate
pause 700

'move forward short
serout 3,t2400,($80,$01,$04,1,13,127) 'position clock
pause 1000

'grip up
serout 3,t2400,($80,$01,$04,3,23,127) 'position midpoint
pause 700

'turn right 90
serout 3,t2400,($80,$01,$04,2,25,1) 'slow speed clock
pause 470

serout 3,t2400,($80,$01,$00,2,0,127) 'stop servo 2 rotation
pause 1000

'forward
serout 3,t2400,($80,$01,$04,0,13,12) 'position s0
pause 1500

'grip down
serout 3,t2400,($80,$01,$04,3,25,12) 'position mid
pause 2000

'close grip
serout 3,t2400,($80,$01,$04,2,25,1) 'slow speed c-clockwise
pause 50
serout 3,t2400,($80,$01,$00,2,0,127) 'stop servo 2 rotation
pause 400

'backup
serout 3,t2400,($80,$01,$04,0,35,127) 'position s0 c-clock
pause 700

'grip up
serout 3,t2400,($80,$01,$04,3,22,12) 'position mid
pause 1000

pause 6000

'set to 0 position
serout 3,t2400,($80,$01,$04,1,35,127) 'position s1 13-24-35 c-clock
serout 3,t2400,($80,$01,$04,0,35,127) 'position s0 c-clock

loop:
goto loop
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
387
Followers
26
Author:mikey77
I believe that the purpose of life is to learn how to do our best and not give in to the weaker way.