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.

Chuck TV Intersect Cube DIY working model

Step 11Programming the Full Function Controller

Programming the Full Function Controller

Firstly, I need to give credit to John Moxham, who published an instructable that showed how the Picaxe can talk with a PC running a Visual Basic program. 

I based much of my design and especially the VB code on his work, see the following link ...

http://www.instructables.com/id/Automate-your-science-experiments/

John's instructable also gives more details on building VB apps over and above the very brief instructions I give below.  I built John's complete project before I even started mine - it's what gave me the confidence I could do it. 

1.  Download the Free Picaxe Programming Editor Software from - 

http://www.rev-ed.co.uk/picaxe/

2. Install the software on your PC and connect the serial cable from the Full Function Controller to your PC.  Set the Run/PRG switch to PRG, and connect 6VDC power supply.

There are a few initial settings (like Com Port)  to be done in Picaxe Programming Editor Software, see the Help menu, especially "Manual 1 - Geting Started." 

3. Use the FILE>NEW menu command to open a new window and then copy and paste in the below code:
..............................................................................................................

input 4 ' touch switch equals 0 if touched, else equals 1

b2=1  ' inital variable value for touch switch on/off state: 1 = off ,0= on

main:serin 3,N2400,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13
 
b2 = pin4

serout 0,N2400,("Data", b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13)

if b2 =0 and b1 = 1 then 'REM b1 is the ready to activte flag set in VB program
b0=3
endif


select case b0 ' determines how to run motor and LED on/off state
case 0
 low 1
 pwmout 2 OFF  ' LEDS and motor both off
case 1
 high 1
 pwmout 2, 255, 350 ' LEDS on and motor at idle speed geeting ready for activation
case 2
 high 1
 pwmout 2, 255, 450 ' LEDS on and run motor at medium speed for test run
case 3
 high 1
 pwmout 2, 255, 700 'LEDS on and motor at full speed in activation & upload mode
else
 low 1
 pwmout 2 OFF  ' LEDS and motor both off
endselect

goto main
........................................................................................................
4.  Click the Little Blue Triangle on the menu bar to download the program.

5.  If you didn't get an error message during the download you're done. 

If you are really stuck at this stage, ask for some help at the Picaxe help forum http://www.picaxeforum.co.uk/

The Full Function controller won't do anything it this point. So just reset  the Run/PRG switch to RUN, and disconnect 6VDC power supply & serial cable.
 

« 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!
12
Followers
5
Author:e024576