Intro:
It’s been really long since my last post. Well, I couldn’t
find something worth sharing, or should I say , I wasn’t working on something cool which is worth sharing.
Finally, after such a long silence, I have something to
share, which seems cool to me.
I used Arduino Uno coupled with ESP8266 wifi module to post tweets of
sensor values on twitter using IFTTT & Maker Channel.
Background story:
After reading & watching couple of blog posts &
videos about, how hackers from around the world have built really smart and
kickass IoT & home automation applications using IFTTT, I couldn’t wait
myself to jump start building one. I just can’t stop myself thinking of
unlimited possibilities that you can built around it.
And thanks to Maker Channel, you need nothing more than an
Arduino and Internet Connectivity to build cool IoT IFTTT application.
Action Plan:
For starters, I decided to build a simple application, which
involves Arduino Uno + ESP-01 + couple of sensors and with help of IFTTT + Maker Channel, post a tweet of current sensor reading,
periodically.
Execution:
First, Arduino configures ESP-01 module and joins Access
Point.
In this case, ESP-01 set to softAP+station mode and joins Smartphone
Hotspot point.
Arduino Uno will process sensor signals. In this case, Reads
Analog pins A0, A1 & A2.
Next, Arduino will take care of assembling the GET request,
with right event name & sensor values [upto three allowed] and Secret
key.
[Secret key is
generated, when you connect your account to the maker channel and create recipe
using that. Visit ifttt.com to learn more.]
In this case, packet with right GET request is assembled which
will trigger maker channel.
[Packet = GET
/trigger/”your-trigger-name”/with/key/”your-secret-key”/?value1=” ”&value2=”
”&value3=” ” HTTP/1.1\r\nHost: maker.ifttt.com\r\n\r\n]
Further, Arduino will transmit assembled packet over ESP-01
WiFi, connected to internet.
Here, ESP-01 starts TCP/IP connection and triggers Maker Channel
with real-time sensor values, on every minute. Further, triggers to Maker Channel,
fires Tweet.
Hardware Used:
- Arduino Uno.
- ESP-01[V1.4 AT SDK]
- Photo sensor – LDR.
- Temperature Sensor - LM35.
- Smartphone with Internet + Hotspot.
- Cup of Tea.
Software Used:
- Codeblocks Arduino IDE.
- ESP8266 library [modified for V1.4 AT SDK].
- IFTTT Account with My IF recipe.
- Music player with deadmau5 Mix.
Results:
Future Plans:
Pollution is one of the biggest threat in front of India and
World. I am going to build a device which will monitor pollution levels in
surrounding, using gas & dust sensor and post a tweet of current levels. I
am looking forward to build it as an Open Source project, and promote it with
support of community & crowdfunding. Let’s build something Innovative.
Resources:
https://developer.mbed.org/users/mbedAustin/code/IFTTT/file/935972c2f628/ifttt.cpp
[Line no 107 only]
www.ifttt.com
Comments
Post a Comment