The folks at Adafruit provide a wonderful, Arduino compatible
WiFi board that enables your project to access the internet
over your local WiFi.
The smallest arduino clone, femtoduino, is capable of using
this nifty WiFi board to get you online, fast. Let's try it out.
You will likely need the following parts before starting:
- One (1) Femtoduino with USB, since we want to free up the VCC and GND pins while powering everything from the USB connection. You can still do this with an original Femtoduino, but will need to power everthing off of a breadboard instead.
- One (1) Adafruit CC300 WiFi board
- Jumper wires
- Wireless Network credentials
Follow these steps to get the GeoLocation example sketch working
- Download the Adafruit_CC3000_Library, add it to your arduino 'library' folder as per the instructions there.
- Connect D13 (SCK) to the WiFi board pin CLK
- Connect D12 (MISO) to the WiFi board pin MISO
- Connect D11 (MOSI) to the WiFi board pin MOSI
- Connect D10 to the WiFi board pin CS
- Connect D5 to the WiFi board pin VBEN
- Connect D3 to the WiFi board pin IRQ
- Connect VCC to the WiFi board pin VIN
- Connect GND to the WiFi board pin GND
- Start up your Arduino IDE, and open the Adafruit_CC300_Library/examples/GeoLocation/Geolocation.ino sketch.
- Update the sketch constants WLAN_SSID and WLAN_PASS to your wireless network SSID, and password.
- Upload the sketch! Make sure you've selected your board in the 'Tools > Port' menu.
- Open the Serial Monitor ('Tools > Serial Monitor'), set the baud rate to 115200. If nothing appears in the Serial monitor, try re-connecting your USB connection, selecting the Serial port, then opening the Serial Monitor again.
Your Serial Monitor should display connection information, and finally, geo-location data.