Connecting the WifiShield to the network and posting/getting data from a webserver.

Post date: Feb 13, 2016 4:46:2 AM

Arduino communicates with the Wifi shield's processor using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Uno

pin 10 is used to select the HDG204 and pin 4 for the SD card. I will not use the SD card for mthe wifi shield.

To deselect the SD card set pin 4 as an output and write a high to it

Digital pin 7 is used as a handshake pin between the WiFi shield and the Arduino, and should not be used.

I had to upgrade the firmware of the wifi shield by following this procedure https://www.arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading

it's a tedious process involving the Atmel's flip programmer don't forget to change the jumper position on the wifishield prior and after upgrading.

To check your firmware version run any example that you can find under Examples/RETIRED/Wifi/ on your IDE. All the scripts are testing the firmware version.

How to connect WEP wifi network:

I want to connect the wifi shield to my 54Mbps wifi network using 64 bits web key.

The Ip address should be delivered by my main DHCP server on my network (no fix IP)

I prefer to work on URL than IP address for all my machine on my network i can maintain a machine name table on my main router.

The arduino will permanently decode any incoming packet from the remote sensor radio transmitter and store it in a variable.

Every minutes i want to post on php page http://myserver.com/dustdensity/add.php?outdoor="Value of the remote dust sensor" to my apache2 webserver hosted on my linux server.

At the same time i want to get the average outdoor dust density for the last 24 h from the following php page page http://myserver.com/dustdensity/getavg.php hosted on my linux server.

Code:

After the compilation i still have the following resources available.

Sketch uses 13,290 bytes (41%) of program storage space. Maximum is 32,256 bytes.

Global variables use 771 bytes (37%) of dynamic memory, leaving 1,277 bytes for local variables. Maximum is 2,048 bytes.

Still plenty of room for the next step....