Go Down

Topic: Feeling interest for a WiFi shield (Read 32438 times) previous topic - next topic

AsyncLabs

Yes you will need to jumper the SPI lines to the new SPI positions for the MEGA board.  Make sure that you use the shortest length of jumper wire possible to make the connection, as a long run could introduce delay, and you could potentially get strange noise and antenna issues on the data lines.

BenQuark

@fweens
To soft reset the WiShield, you can use the following function and call it whenever you want to reset the WiShield and cause it to reconnect to the AP. This piece of code blocks until the WiShield reconnects to the AP.

Code: [Select]

void wishield_reset()
{
 // setup initial state
 zg_init();

 // setup the interrupt pin
 attachInterrupt(0, zg_isr, LOW);

 // loop here until connection established
 while(zg_get_conn_state() != 1) {
   zg_drv_process();
 }
}


Thanks,
Ben

fweens

@BenQuark,

OK thanks, I'll try that... And this work on any board, doesn't need a specific bootloader or whatever?

If you want to have a look at my Arduino + WiShield system; I use it to measure data from my Bonsaii, the first part is just RSS data for double check :
http://weens.fr/Weather/LASTWEATHER.htm

Good day,
Franck

John_Ryan

@fweens

Awesome, is that live data from your Arduino?

fweens

@John_Ryan,
Apart from the top which is RSS data, yes. Live data starts from LAST DATA FROM SENSORS. In fact every hour I upload "raw" data in a database (right now 114 records) and then a PHP script compute min, max, average and check wether these values are lower/higher than predifined values or average to generate alarms.

Franck

John_Ryan

Nice work!

I've done a lot of research on Flash and it appears many developers experience problems with Internet Explorer and live data.

Unfortunately I haven't found a fix which is a shame as I have about a dozen different open source meters, dials, and gauges that automatically redraw when XML data changes.  

In the mean time I might try and find a few OS Ajax gauges that aren't flash and attempt to complete my demo that way, I think it would be a shame to exclude IE usability since so many people use it.

fweens

@John_Ryan
Flash is fun but doesn't work neither on IPhone... I prefer using PHP and I'll use a graphic library -since I want to draw diagrams, like this one: http://pchart.sourceforge.net/screenshots.php?ID=22
Franck

mircho

I don't know if this will fix things but the usual fix for IE in all JavaScript libraries is to append to the request a dummy parameter with the current timestamp. That makes the request unique for IE and prevents it from caching.
Example url:

mypage.php?user=1&product=2&_ts=12344566778

This works just fine for ajax, so for flash should be the same

fweens

Right, I already used a random number also with Flash and it also worked!
Franck

John_Ryan

Thanks guys. I ended up rewriting the Ajax and implementing an update timer instead of using the Flash 'refresh' , as well as the random number 'trick'.

So, lets try this again.

Type any 9 letter word after ?

eg:-

http://www.ymicros.com/?wireless

Now in a second window, open this URL

http://www.cssgurus.com/gauge/index.html

I've set the timer at 10 second intervals, but it's quite capable of updating once a second.

For anyone that's interested, I had the shield running all weekend and this week, so it performed flawlessly for 5 days straight before I uploaded a revised sketch = )

For anyone new, ymicros.com points to the IP of my WiFi shield, what your seeing is data passed from your browser, to my Wifi shield, then back to a remote server. The Ajax/Flash gauges on that remote server show live information in real-time .. it's quite fun to watch.

fweens

This is really cool :-) !
Franck

John_Ryan

@fweens

Yeah it's a lot of fun, I'm happy they update in real time in all browsers now.

I'll try and get the other 9 gauges up over the next few days, but my biggest problem is I haven't got time for wiring up live sensors to the board which is why I'm using the ? filler data and a visitor counter. So once the applications built, that will be next on my to-do list.

The gauges are easy to "plug in" and feed data to now the Ajax has been organized properly.

Have you tried Bens reset code yet to see if it works? I'd really like there to be a way for the board to re-connect if the local signal drops out, and I'd like it to keep trying until it succeeds. If the shield is to have a future in remote sensing and control then it's got to be reliable, especially if it's used for something like web based household security, or monitoring core temperature levels at a nuclear power plant lol  

 

fweens

@John_Ryan,
No haven't tried yet... I didn't understand if it worked like watchdog. If yes, I'm a bit scared to try it since I don't know which booloader is embedded in my board -wouldn't like to stuck my board!!
Otherwise my idea is: after reset: upload data, sleep 1h, then reset.

Franck

John_Ryan

#448
Jul 08, 2009, 03:49 am Last Edit: Jul 08, 2009, 03:50 am by John_Ryan Reason: 1
@fweens

I agree, it's probably best to let Ben try it first ... Ben? lol

I've added more gauges and they run beautifully in IE and Mac Safari, but in Mac Firefox, two of the sensors titles aren't displaying the title names assigned, and in PC Firefox and PC Chrome.. the gauges don't display at all #@$@$

The gauges are open source (free to use) so I visited the site where I found them and their demo's also don't work in PC Firefox. However, the Flash+php versions which didn't originally work in IE, do work in Firefox .. but not in IE!

So it "appears" the developer might have hit a wall on the Firefox/IE "thing" and released two different types of Flash animations with two different methods of updating, php/asp or Ajax.

Now, it's nice that the person donated his time creating open source gauges, but! there isn't any mention of the facts I've spent a great deal of time "figuring out". And that's slightly annoying, because I could have saved a dozen hours if I'd known about these issues beforehand.

Anyway .. here it is again, let me know if you find any "other" glitches.

Type any 9 letter word after ?

eg:-

http://www.ymicros.com/?explorer

Now in a second window, open this URL

http://www.cssgurus.com/gauge/index.html






PeterM

Great demo, John_Ryan!
I'm still at the text level:
http://bitfizz.com/ardu/reportSeeR.php

...simply reading a photocel, converting the value into a GET var and posting it every 15secs to my database via PHP. Trying to go one step at at time and keeping it simple, since C isn't my my native tongue.

I'm having no issues with resets, even with my flaky ATTUverse connection; running very smoothly.

Now I need a long-life battery. I wonder how long the Sparkfun 2000mAh Lion pack would hold out?

Go Up