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.

Control real world devices with your PC

Step 13Run the program

Run the program
Power up the picaxe if it isn't powered up. Run the vb.net program by clicking on the green triangle at the top of the screen near the middle. To the right of the run triangle are a pause button and a stop button, or the program can be stopped by clicking on the top right x or with File/Exit if you have added a menu. The program can be compiled if you like but for debugging let's leave it running within VB.

The timer is sending out bytes every 5 seconds so it takes 5 seconds for the display to come up.

The label1 is displaying a dump of the 14 picaxe registers. These are sent to the picaxe and then send back again. It almost certainly isn't necessary to send all 14 and your code can be changed to suit. The second byte with a value of 152 is the value of the pot which changes from 0 to 255.

If button1 is clicked it sends a value of 120 in the first byte and if button2 is clicked it sends 160 and the picaxe program decodes these and moves the servo.

This code shows how to send data and get data back from a microcontroller. The microcontroller can turn on all sorts of devices - I have about 30 round my house running sprinklers, lights, security, detecting cars in driveways, turning on a number of 3.6Kw pumps and sensing the level of water in tanks. Picaxes can be daisychained on a common bus and can even communicate with each other via radio links.

It is also possible to upload and download data from websites and hence use the internet to connect devices anywhere in the world http://www.instructables.com/id/Worldwide-microcontroller-link-for-under-20/

The next two pages also contain some examples of how to use different sensors and how to control different devices.

Dr James Moxham
Adelaide, South Australia
« 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!
29
Followers
3
Author:Dr_Acula