Picaxe promotion on Instructables

moxhamj

New Member
I have recently published two Instructables - one on how to control a device like a servo using a PC (a relatively simple project for picaxers!) and a more complex one on linking two picaxes using the internet. http://www.instructables.com/id/Control-real-world-devices-with-your-PC/ and http://www.instructables.com/id/Worldwide-microcontroller-link-for-under-20/

The first one has had over 3000 views in two days and is sitting at the top of the featured list at the moment. Hopefully some of these views will translate to projects and will generate some more worldwide interest in the Picaxe. I'm still not sure anything, even Arduino, could do both of these demo projects so cheaply.

Question to Stelios and Puddlehaven - do you think we can link in the single chip net server in some way?

If anyone has an unpublished working picaxe project perhaps give thought to publishing it!
 

MORA99

Senior Member
do you think we can link in the single chip net server in some way?
Do you mean the simplelan? (because its not really one chip)
If so I think it requires a X1 part, but then two picaxes can talk together, maybe with a chat server inbetween to overcome the private dsl limitations.
 

D n T

Senior Member
Doc is that your mug shot? Maybe we could have that here ?

If we had a picture or something I guess it would take up more room, but it could be handy,
By the way is there a place on here were I can get some PICAXE related icons for my PICAXE files, the PICAXE folder icon is difficult to distinguish from every other folder icon on my screen.
 
What I've been working doesn't make a Web server out of a Picaxe, it makes a network bridge out of a PC. I'm not sure I could write an Instructable-style document out of that, but then I'm not that familiar with Instructables right now.

Chuck
 

Tom2000

Senior Member
Look what just showed up in my weekly Instructables newsletter.

Congratulations, Dr_Acula. Looks like you have a hit on your hands!

Tom
 

Attachments

moxhamj

New Member
Yes, simplelan. I think it does email but can it do FTP? Is it possible for me to send a small file to a simplelan device. Or even a more direct way of interfacing (getting out of my depth here, but is it windows sockets that does direct linking?).

Instructables look a bit daunting but what I do is take some pictures and shrink them to 640x480, then take some screenshots (using paint shop pro), then open Word and write the text and pictures as a word file. This does all the spell checking etc. When it is finally right it is a simple matter of cut and paste through the instructable steps (which are essentially one picture and some text per page).
 
Last edited:

manuka

Senior Member
9V batteries = KI$$ OF DEATH

I'd run across these Instructables as well- bravo!

REALLY IMPORTANT: Can you perhaps mention 2 or 3 AAs make a better PICAXE power supply than costly 9V batteries? Most modern electronic devices now run happily in the 2V-5V range, meaning there's no reason to go to 9V. It's common to be billed more for a 9V battery than a hi tech micro, & with their energy capacity ~zilch,schools & hobbiests often blow budgets on just these. Ex. I helped a NZ school recently with " a pound a head" (~US$2) white LED project for ~200 kids. We ran off AAs that cost ~US 25c each & had ~ 2000mAh capacity, whereas 9V batteries were more like US$2 each & had just ~300 mAh capacity. We couldn't have even done the project if 9V had been used!

Equipment WILL be accidentally left running = ARGH when you need it next! With AA supplies you can always rob some from a handy digital camera etc short term. The only handy 9V batteries around are usually in smoke alarms, & when they're neglected to be put back the protection is lost. This is a SERIOUS ISSUE - every year in NZ we have fatal house fires where it transpires the smoke alarm battery had been removed...

As a policy many years ago I ceased designing projects or purchasing test gear calling for 9V batteries. They'll nickel & dime tight budgets to death otherwise. Of course 9V will seriously distress a PICAXE (or LEDs) as well, & even considerate equipment users WILL assume you just "clip n go" = further waste & frustration. Stan
 

MORA99

Senior Member
Yes, simplelan. I think it does email but can it do FTP? Is it possible for me to send a small file to a simplelan device. Or even a more direct way of interfacing (getting out of my depth here, but is it windows sockets that does direct linking?).
You can send emails from simplelan, but not recieve.
It can recieve udp packets and http traffic (and send udp traffic), both are fixed at the default ports 22022 and 80.
No ftp or other protocols.

So it cant really "pull" a (ftp) server for new data, since it has no TCP based protocols, that can be controlled form the PICAXE both ways.

But with a custom chat server it could act as a mailbox, I was told routers these days will allow an incoming UDP from the same ip and on the same port as you just sent out.
So if the PICAXE/SimpleLan sends out a tag/username, the chat server can return all waiting "mail".

If the systems is running at the same time, and we can ignore the firewalls/routers, then they can send udp directly between each other.
 

steliosm

Senior Member
If you are plannig to use small chunks of data you can pass this data as an HTTP GET request to the SimpleLAN. SimpleLan can handle up to 5 variables of 64bytes plus seceral varialbes of 16bytes and 4bytes!

Things to watch out for:
- The HTTP GET request can pass data to the Web server up to 256bytes.
- The SimpleLan's web server might not be able to handle that much data at once.

As for the .NET and SimpleLan interface a simple thing to do is:
-Create an index.htm file to the simplelan
- Open a TCP connection to SimpleLan's IP at port 80
- Send out data string like:
HTTP GET index.htm?At_var01=This_is_NET
<2 new lines characters>
- Close the TCP connection.

You could use a 'chat server' somewhere in the world, but you'll have to use UDP packets and also have a place to host your UDP 'chat' server.

If you have a SimpleLan available we could run some tests.
 
HTTP GET index.htm?At_var01=This_is_NET
This is trivial to do with .NET. Here's the C# code (translating to VB left as an exercise to the reader ;)). It looks a little funny because we are uploading data with a download command, but when you use a WebClient download method on an HTTP site it uses GET, uploads use POST.

Code:
System.Net.WebClient simpleLanClient = new System.Net.WebClient();
string reply = simpleLanClient.DownloadString("http://simpleLan.Address.On.Web/index.htm?At_var01=This_is_NET");
Unfortunately, I don't have a SimpleLan module to test against, there are a couple of things I can't test that I'd normally need to:

  • What kind of encoding do I need to use to send non-ASCII data to the SimpleLan? I'm guessing standard URL encoding, but I'd like to test.
  • What is the contents of the reply returned by the SimpleLan? GET implies something comes back down the wire, but it's not clear what.
Chuck
 

MORA99

Senior Member
[*]What is the contents of the reply returned by the SimpleLan? GET implies something comes back down the wire, but it's not clear what.
It just sends the webpage you asked for, the extra GET data is "ignored" asin it dont impact the data that are sent.


I have a simplelan doing nothing, that could be used for tests, and another one running a relay board (for 2-3monts in a row 24/7 now).
 

steliosm

Senior Member
MORA is the SimpleLan getting very hot while is working?
I remember while playing with mine that the simplelan as well as the voltge regulator were getting VERY hot.

I'm waiting for my 28X1s to arive. We can start testing then, since the 08m are no very fast for bidirectional communications.
 

MORA99

Senior Member
I havent checked directly on the components since theres mains in the box, among others a server thats normally on always.

But the plastic box its contained in is warm, 40C or so, so it does make some heat.
I use a 7805 from 9V unreg adapter, the relays is 12V but they will work fine with 9.
In total the regulator is making around 130mA, and im drawing another 100mA from the unreg.
No heatsink on the regulator.

Should have included a DS18B20 and export it value to the website :)
 
Top