Website Logo. Upload to /source/logo.png ; disable in /source/_includes/logo.html


News and Updates about OpenSensors.IO

Installing an Arduino Wifi Shield

After a few Arduino projects (mainly blinking LEDs and connecting sensors) I tried to connect my Arduino to the internet using a Wifi shield!

I started by looking at Arduino Wifi shield instructions.

Then I physically connected my Arduino and Wifi shield:

As a test I wanted to scan for available networks using the example code on this Arduino Wifi shield webpage.

I mentioned in a previous blog post I had an issue with the Arduino IDE and now use inotool. It enables to code for Arduino in your text editor/IDE of choice and compile and upload code from the command line (but it still needs the Arduino IDE to be installed).

Here’s how I start a project with inotool:

~$ mkdir new_project && cd new_project
~$ ino init

Here’s the structure of my project afterwards:

I can then edit the code in src/sketch.ino. In that case I just copied/pasted the code from Arduino’s example:

I built as usual using this command:

~$ ino build
… and got the following error:

=> It seemed there was a conflict between the Ethernet and WiFi Libraries.

… Then I kind of lost it (O_O) and tried all those things:

  • bypassing both Arduino IDE and inotool by using a Makefile for compiling Arduino ( => and I got lost down makefile rabbit hole…
  • updating (or trying to update) the wifi shield firmware using Arduino’s instructions and blog posts. => when I finally managed it, it didn’t have any effect…
  • downgrading from Arduino IDE version 1.0.5 to 1.0.2 (older versions are found here). => no improvement really…

I went back and forth between those solutions and at best I could compile the sketch but my MAC address was (same for my IP address)!

Here’s how it finally worked for me:

Yay! (^o^) You can now try new projects like creating a webserver or sending sensor data via internet!

(***) In case you wonder what a J3 jumper looks like, those pictures could be useful to you:

  • Here the J3 jumper is open (for when the shield communicate with the Arduino):

  • Here the J3 jumper is closed (or in programming mode, to update the firmware):