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.

Worldwide microcontroller link for under $20

Step 9Run the program on both PCs

Run the program on both PCs
Start running the program by clicking the green triangle at the top middle of the screen - the 'Start Debugging' button. Nothing will happen for 20 seconds and then the program will attempt to connect to the ftp server and will attempt to connect to the picaxe. The pictureboxes will either go red or green.

The ftp location is a free website and anyone can use this but you need to use a different ftp working filename (mine is DoctorAcula1) otherwise we could all end up with each other's data if we use the same filename! If you like you can eventually get your own ftp site - just change the ftp location, username and password in two places in the code from my 0Catch website. Most websites allow ftp. Multiple computers can access the same ftp file - the ftp fileserver sorts out in what order these happen. Occasionally there are data clashes or hangs and these seem to happen every 20 file reads. There is a timeout in the code if this happens so it returns no data rather than corrupted data.

Using a broadband connection with a 128kbs upload speed means a file upload takes about 3 seconds but sometimes up to 8 seconds, most of which is taken up in handshaking rather than data transfer. This sets the timer1 time of a minimum of about 20 seconds taking into account download, upload and chat with the picaxe. With very fast broadband you may be able to shorten the cycle time.

You can change a register manually within the VB program. If you do, the next timer cycle skips downloading from the ftp site and sends the new data to the picaxe and then reads it back and uploads it. The new data thus finds its way to all picaxes linked to this group. This is helpful for debugging and/or for linking PC software into the microcontroller hardware loop. Websites can also access the hardware loop using PERL script or similar to write a new file to the ftp site.

This screenshot was taken running the Tx chip, the switch was on and the register b0 = to 1 had been sent to the Rx chip which had then changed register b1 to 1 as well. The led was thus lit on both boards.

This is a trivial application but it is easy to turn on a 3.6Kw pump instead of a led. Some more ideas are at http://drvernacula.topcities.com/ including linking picaxes via solar powered radio links. With radio links plus the internet it is possible for 'The Machines' to reach into many corners of the globe.

There are some ideas around on the picaxe forum about taking this idea further and replacing the PC and ftp site with dedicated webserver chips that plug straight into a router. Clearly this would decrease the power consumption of a link. If you are interested in further discussions please post on the Intstructable comments and/or on the picaxe forum.

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