Step 9Run the program on both PCs
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 Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|



















































