-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to use on WiFi Shield #20
Comments
OK, cool! (I think this was the first time someone forked my code and cheers, Simon On 03.10.2012 21:23, Aaron wrote:
|
Well, it works perfectly so far, but mostly (I think) due to the fact that On Wed, Oct 3, 2012 at 11:30 AM, Simon Rönnqvist
|
That's funny, didn't work all that perfectly for me. I had to make the cheers, Simon On 03.10.2012 21:39, Aaron wrote:
|
The Webduino wifi fork works great. I took the library "as is" and it ran out of the box. From the examples, I used the "Web_Demo" sketch as a starting point. The example sketches need conversion from Ethernet to WiFi, but that is easy. First, replace the Ethernet references in the sketch to WiFi. Then redo the setup from setting up the Ethernet IP and mac address to setting up the wifi radio with ssid and password wifi (example on the official Arduino web site). Also reserve pin 53 (mega) as an output for the wifi shield to operate properly. By the way, I used two recently purchased official Arduino wifi shields, and they both had to be reflashed with the latest firmware to work properly: http://www.dfrobot.com/community/2012/11/how-to-upgrade-arduino-wifi-shield-firmware-on-windows/ The Web_Demo sketch had two other issues. First, the digital pins were set up as INPUT, which made their values unstable, causing the radio buttons to lose their state after an update. Just change the pinMode setting loop to OUTPUT. That makes the radio buttons work correctly. Second, the "server << " line that sets the beginning of the HTML form for the radio buttons was content sensitive. It put out nothing instead of the "server << " ";" I narrowed it down to an inability to print "" using the "server <<" syntax, but could not fix it. I think it may be a bug in some library.Thanks for doing all of the work on this. I have now successfully run the official wifi shield with a Mega 2560 for four days and over 500 page loads. |
Hi DonKnowlton I am new to webduino and found your comment about exactly what I was trying to tackle. Can you instruct how exactly you convert the ethernet to wifi? thank you |
Here are a few thoughts to establish a baseline of where my project stands. My goal is a stand alone web server to control digital functions remotely and return analog and digital data upon request through a web browser. I want to be able to leave the server unattended for at least three months. I tried various web servers sketches from the arduino web site and other sources, but they usually hung up in short order, especially trying to handle rapidly occurring requests from multiple clients. The Webduino had two main advantages. First, the Webduino library handles the mechanics of the server-client communication, so I could focus on my application and a little HTML. Secondly, it seemed reliable, I had it on the external internet for ten days and loaded over 300 pages with no problem. I was able to view my pages from over 100 miles away with Firefox, iPad Safari, iMac Safari, and IE. Since my previous post I have found a reliability problem, but I don't think it is because of Webduino. At ten days, I had a power failure that affected both my arduino and my LAN. When power came back, the arduino could not be reached from a client. After a few experiments, I determined that the wifi shield does reconnect, but the sketch just stays in void loop() and does not see the client request. If the project does not see an operating LAN when it powers up, it eventually connects but can't handle a client request. In my case the ATT Uverse router takes about two minutes to start up so the arduino does not see a valid network because the arduino/wifi shield returns from a power failure in less than 20 seconds. I suspect the problem is either the wifi shield firmware or the wifi shield library. The firmware is clearly in flux and has been updated two days ago and three weeks ago. I reflashed my firmware, but that was way back in early December. As shipped, the shield was extremely unreliable before reflash of the firmware. So, first priority is to be sure your firmware is current. I plan to reflash my shield next week and see if that fixes the above problem. You are new to Webduino, do you have arduino and/or C++ experience? I am new to all of these. I don't see a way to put my sketch up on this forum. If you request, I will send it to you by email and would appreciate hearing back if you solve the power recovery problem. Otherwise, my advice is to use the forked Webduino library: https://github.com/acarlton/Webduino/tree/wifi And: Observe the pin restrictions in the wifi shield documentation. Some of them conflict with the pins in the Webduino examples. The Webduino examples at this link have not been converted from ethernet to wifi. Add the wifi connection setup to the sketch. Put it in the void loop(), not void setup() if you think your wifi might ever need to reconnect after the initial connection. Set up sequences are in the web server examples on the arduino web site. Take out mac address and lan address setting instructions. Ethernet shields need this, the wifi shield gets these automatically. Be sure to reflash the firmware!! By the way, some of my text in the previous comment was garbled because I was trying to send text describing my HTML. My comments were interpreted as HTML and not printed literally. I don't know how to avoid that. |
Thank you for your thorough reply. I don't have much experience in arduino and C/C++. It would much On Sat, Jan 19, 2013 at 1:44 PM, DonKnowlton [email protected]:
|
I am attaching the sketch. If you do not get it this way, send me your real The sketch is a work in progress and has some things for temperature, real time It is sent "as is". |
Here it is "[email protected]". On Sun, Jan 20, 2013 at 8:15 AM, DonKnowlton [email protected]:
|
DonKnowlton or bedfordking, could you send me that sketch? Im too having difficulty adapting the webduino library to my wifi... I get some compilation errors... |
I never got the wifi shield to work reliably. The best it ever ran was for a week or so and then it locked up. Many times it failed within a few hours. Since then I have gone to using the webduino library with the ethernet shield. It requires a wired connection, but it has never failed. I have about 12 weeks of continuous operation. My conclusion is that there are problems with the official arduino wifi shield and its software that have never been fixed. Other people in various arduino forums have had similar experiences. If you still want it, I can email the wifi webduino sketch to you. That requires a slight modification to the webduino library to run with wifi instead of ethernet. Do you still want it? Don Knowlton On Thursday, December 18, 2014 10:03 AM, jenriquecerda [email protected] wrote: DonKnowlton or bedfordking, could you send me that sketch? Im too having difficulty adapting the webduino library to my wifi... I get some compilation errors... |
Yes please send me the sketch. I have touched my arduino project for a On Saturday, December 20, 2014, DonKnowlton [email protected]
|
I cant believe what a piece of crap the shield resulted to be. 80 bucks thrown to the trash. Ive also seen this is a persistent problem in other forums. Enviado desde mi iPhone
|
I bought three of them. None worked properly. That's $250 down the toilet. I recommend Webduino with the Ethernet shield. Bedfordking, I previously sent this sketch to you. It has not changed. Jenriquecerda, do you still want the wifi sketch? I can pretty much guarantee it is not reliable. If so, please send your private email address to me at [email protected]. Don
|
I'm using a few Arduino Ethernet shields (not WiFi) to upload data to sites like Weather Underground, Xively, Twitter etc. I'm not using the Arduino as a web server. I find the sketches hang from time to time. Is there anything in webduino what would make this more reliable, or is Webduino only good for serving web pages? |
I have not tried a client mode project. I don't know if Webduino supports that. Don
|
For improved reliability, have you tried the watchdog timer? http://www.megunolink.com/how-to-detect-lockups-using-the-arduino-watchdog/ |
Thanks for the link, I haven't seen a version of the WDT that outputs to the serial port where it hung, that's pretty cool. I've been intending to add WDT to my sketches. I've heard that it doesn't work properly on all Arduino's and some may need a new bootloader installed. |
I have updated the most recent version of Webduino to be compatible with Arduino IDE v1.6.0+, if anyone is having problems with @acarlton's Wi-Fi fork. |
I forked your Webduino library and managed to get it working with a few changes for the WiFi shield here:
https://github.com/acarlton/Webduino/tree/wifi
Just wanted to say great work. Didn't know how to contact you except via an issue. Thanks!
The text was updated successfully, but these errors were encountered: