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.

SOCBOT - The Next Generation Vibrobot

Step 3DOWNLOAD THE CODE TO THE PICAXE

DOWNLOAD THE CODE TO THE PICAXE
.

This is the picaxe code I wrote to use with the socbot. As the socbot has no download circuit you will need to program the picaxe on a proto board and then move the programmed chip to the socbot.

The code uses the infrain2 command to wait for one of 3 valid codes from the universal remote. Depending on which code is received, the picaxe will send a 100mS current pulse to one motor or both motors. If the button is held down the current pulse repeats until the button is released.

A copy of the picaxe bas file is included below for download.



MAIN: let dirs= %00010111

BEGIN: let pins= %00000000
infrain2
let b0 = infra
if b0= 16 then AHEAD ' CH+
if b0= 19 then LEFT ' VOL-
if b0= 18 then RIGHT ' VOL+
goto BEGIN

AHEAD: let pins= %00010111 ' Outputs 0,1,2,4 HIGH
pause 100
goto MAIN

LEFT: let pins= %0000011 ' Outputs 0,1 HIGH 2,4 LOW
pause 100
goto BEGIN

RIGHT: let pins= %00010100 ' Outputs 2,4 HIGH 0,2 LOW
pause 100
goto MAIN

.
Socbot.bas531 bytes
« Previous StepDownload PDFView All StepsNext Step »
5 comments
Jul 31, 2010. 1:10 AMBoppo3 says:
how do you actually program a pic axe?? i know this instuctable said use a protoboard, but i just dont understand how.... can anyone make an instuctable on programming?
Mar 19, 2010. 3:28 PMFuzzer3legs says:
 What Do I Do

MAIN: let dirs= %00010111
                 ^

Error: Unknown symbol - dirs
Mar 19, 2010. 3:40 PMFuzzer3legs says:
 Never mind I was picaxe 08 instaid of picaxe 08m
Jan 23, 2009. 6:41 PMklee27x says:
Hey, geeklord. I followed you here, lols. A PICAXE is to a PIC what an Arduino is to an AVR. A PICAXE is a PIC microcontroller with a proprietary interpreter and function library already burned onto it. What this means: You load your BASIC-style code into it's data memory, and the boot-strap program that's already been burned onto the chip takes these instructions and activates prewritten routines in the PIC's native language. This makes a PICAXE capable of doing highly complex functions with simple commands.
Jan 23, 2009. 6:18 PMgeeklord says:
are PICs and PICAXEs the same?

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!
84
Followers
8
Author:biochemtronics
After a career in industrial electronics I went back to college and now do DNA research.