Search This Blog

Sunday, September 12, 2010

Got the arduino ethernet shield working

Ordered an ethernet shield from ebay, and it was shipped from Hong Kong.  It cost 9.95 plus another 9.95 to ship.  I got it in about a week.  I was kinda shocked it came so fast.  Plugged it in and the lights flashed.  Tried the ethernet client and server apps, neither would work.  Fooled with my router, trying to see what IP address was assigned to it.  It never showed up on the DHCP table in the router.  I decided it was busted.

Eventually I gave up and ordered for $39
I bought it through Amazon, but now i see it is out of stock.  It had an SD card slot and was much nicer than the chinese one i bought.  My router saw it immediately, and after changing the IP address to the one my router showed in the DHCP table, and changing the server to google for me.  This is done by
using cmd in the run box and opening a terminal window. type ping and you will get back the local IP address for google.    Uploaded to the arduino and ba da bing, data started pouring back.

I found that someone had developed a DHCP version of the ethernet library, that worked perfectly
This was awesome.   You download and replace the Arduino libraries.  I had trouble at first getting it to find an IP address, until i notice the line that said some routers need a delay to work, and a delay statement commented out.   I uncommented it, and bingo.  The IP address was obtained at home , and also at work where we have a typical big company network monstrosity.

I used this and the tycho navy time site, and the yahoo stock download pages to write an app to pull some data down and made a little desk clock with an LCD display.  Within the weekend of getting the ethernet shield, my little toy was done!

No comments:

Post a Comment