The purpose of this project is to create a IoT (Internet of Things) device with arduino which send data to ThingSpeak by WiFi, and create real-time graphics.

ThingSpeak store and retrieve data from things using the HTTPprotocol over the Internet.

We are going to create a tiny device (60x90 mm - 2.36x3.54 inches) with the Feather Huzzah card from Adafruit and send data to ThingSpeak using the ESP8266 WiFi device. We are going to send the data from our light sensor made with a photoresistor.

Eventually, the whole device will hold in a tiny box (3D printed + wood) which will make our IoT project fully wearable.

ref : https://en.wikipedia.org/wiki/ThingSpeak

Supplies:

Step 1: Demonstration

Step 2: What We Need

- Adafruit Feather Huzzah ESP8266

- Battery Li-po 3.7V 550mAh (or more capacity)

- Photoresistor

- Resistance 1kOhm (x4), 2.2kOhms (x2)

- Led RGB

- tiny switcher

- Wire

- 3D printer (optional)

Step 3: Build the IoT

--> Connect the 3.7V Li-Po battery to a switcher to power the board.

--> We get a 3.3V supply to power our photoresistor. The analog input of the Feather Huzzah has a limitation of 1V, so we cut the power from 3.3V to 1V max. Our photoresistor value vary from 500 Ohm to 50 KOhm (full dark to full light). The resistor allow staying analog input under 1V.

--> We supply a RGB led in order to show to the user that the connection between the card and the website is going well. In the code, we show a red light when the device isnt connected, and a blink of a blue and a green light, when it's sending data (see the video). The digital output 12, 13, 14 supply the R,G,B led.

/!\ The max per pin is 12 mA and the max for the entire package is 85mA.

Step 4: Send Data to ThingSpeak

In the arduino code that follow, we send the luminosity data to TeamSpeak. Add your channel ID and the SSID/password of your internet connection in the arduino code.

The analog pin give arduino a digital number (0 to 1024). We translate this number between 1 to 100.

As we can see, we can build several graphs such as a real-time gauge, and a graph with settings. Here we can see that the luminosity is getting lower and lower as the time goes.

Step 5: 3D Printed Socle / STL File

Once we builted the IoT device, we will put the whole thing in a tiny box.