Got my WiShield and Arduino, it's a very cool setup. My goal is to stick this thing in a water proof box and use my G1 (Android phone) as the frontend to interact with my project. I figured the best way to do this is to use JSON to send info back and forth (JSON is very lightweight, and easy to parse and use in Java and JavaScript). This seems simpler than trying to generate a full HTML web site. With JSON, you could even create a local web page and use AJAX to load the data.
I've gotten started on it, just wanted to get some feedback on the project before I get too far (I'm a Java programmer playing with pointers, so there's probably all kinds of problems with that code ).
It's hosted at google code (can't insert url, it's my first post), listed as "arduino-json": code.google.com/p/arduino-json/
The current commands available are:
write_eeprom( int loc, int value )
write_dpin( int pin, int val )
write_shared( int loc, int value )
read_eeprom ( int start, int finish )
read_dpin( int pin )
read_adpin( int pin )
read_shared()
("shared" is a public array of 16 unsigned integers, accessed through the RemoteJSON class. It should be used to avoid unnecessary reading/writing EEPROM to communicate with the device. )
Anyone have any input on any other commands that might be useful?
I am thinking a project using wishield + X10 + arduino to
control the lights at home, through internet. So you think
I could use JSON to get x10 commands and drive
x10 (we already have x10 lib support)?
This is great!! This is the kind of use we envisioned for the WiShield. The WebServer was just a quick visual way of showing people how useful the device can be. I can see a lot of use for this library. Keep us updated and let us know if you require any special hooks to simplify interface to WiShield.
hi, this sounds supercool!
got my wishield and hoocked it up to arduino...
unfortunately it is not working as expected...
every thing compiles well und uploads to the arduino (all good)
but the no wifi action....
(i changed all the ip and adapted every thing to my network invironment)
is there a pin/port issue? i tinkered around the code to change some of the port numbers...some changes happend (suddenly the little LED from the wishield board went on)
had to solve some other conflict...in webserver.h and server.h
typedef struct webserver_state {
struct psock p;
char inputbuf[10];
};// uip_tcp_appstate_t;
the LED is finally light up...but that is about it...
very frustrating...i have 2 shileds none work...
help
What does your setup look like? ATMEGA168 or ATMEGA328? Can you run the sample sketches? What is your AP? Is security enabled?
If the LED lights up, that generally means that the shield is connected to your AP. You may not be on the same subnet as the shield, or you could be running WEP with an incorrect key (just postulating some common issues).
hi, i got the LED light on, this is good news (so many paramaters that can go wrong even in the code there are changes to be made)
I also got the connection 'to' the arduino from my laptop (laptop connects to it) but this is what i missunderstood!
it needs its own ip
it needs to connect to the local router (lowest id) (did not understand this one)
it needs its ssid (clear)
it needs security credentials to connect to the local router
klick!! i totally missunderstood that i as to concentrated on the LED
will change some configs on my rounter i think this should do will keep you informed on the results...
I'm working on a set of improved X10 libraries for the Arduino and I'm planning to create a RESTful JSON interface for it supporting both the Ethernet Shield and the WiShield. Check out my blog load-8-1.blogspot.com for more info