Notification Flag - Great Intro to Wi-Fi, IFTTT & Huzzah ESP8266

by elwoodleach in Circuits > Arduino

11364 Views, 127 Favorites, 0 Comments

Notification Flag - Great Intro to Wi-Fi, IFTTT & Huzzah ESP8266

Flag - DIY Notification Flag
IMG_1765.JPG

I am always missing important things ... so I created Flag. An Internet of Things (IoT) device to notify or remind me of these important things!

Now with a quick glance over to my desk I can see if ...

  • I have an email
  • I was mentioned in a tweet
  • I have an upcoming google calendar event
  • It's time to call mum
  • My team scored
  • I forget to eat
  • I need to exercise

...or almost anything else. For this Instructables I will be notifying myself when I receive emails.

This is project is a great introduction to Wi-Fi connected devices and the Internet of Things.

We will be using...

IFTTT.com (an API gateway) to trigger...

io.adafruit.com (an IoT cloud data service) to trigger...

MQTT (the connection between the internet and your board) to trigger...

Feather Huzzah (an Arduino compatible WIFI microcontroller) to trigger...

A servo motor which will...

Notify us!

Required Components

IMG_1781.JPG
IMG_1832 2.jpg

For the low low price of only $37.50 or less!

You will need...

Materials:

WiFi Microcontroller $16

Micro Servo $10

Pushbutton $1

Resistor (any value)

Tiny Breadboard $4 (or protoboard)

Stacking Headers $1

Jumper Wires $2

Project Box $3.50

Lithium Battery (optional)

Velcro (optional)

A Little Flag (we will make this)

Tools:

Computer with Arduino IDE installed

Soldering Iron and Solder

Large and Small Philips Screw Drivers

Scissors

Glue Stick

Wire Cutters

Desktop Printer

Setup Huzzah for Arduino IDE and Connect to WIFI

To get started lets test our microcontroller.

Follow this tutorial from Adafruit: https://learn.adafruit.com/adafruit-feather-huzzah...

This tutorial will allow us to use the Feather Huzzah on the Arduino IDE and ensure we have all the necessary USB drivers installed.

Signup to Io.adafruit & IFTTT

Screenshot 2016-12-08 15.21.01.png
Screenshot 2016-12-08 15.14.59.png
Screenshot 2016-12-08 15.23.09.png
Screenshot 2016-12-08 15.20.38.png
Screenshot 2016-12-08 15.22.08.png
Screenshot 2016-12-08 15.21.47.png

To trigger the wifi microcontroller we will be using Adafruit's io.adafruit and IFTTT.

Create an io.adafruit account and setup a new switch labled flag.

Create a new dashboard.

Create a toggle switch in the dashboard labled 'flag'. Leave the default settings for the toggle ON and OFF (we will refrence this text in the code so take note of character case).

Create an IFTTT (If-This-Then-That) account

Under the 'My Applets' tab select a new applet.

Under 'IF' choose an IFTTT trigger to raise your flag.

Under 'THAT' search Adafruit and reference the io.adafruit toggle switch you created earlier.

You can test your trigger by checking the toggle switch on your io.adafruit page. We will be communicating the position of this toggle with our Huzzah Wi-Fi board.

Connect to Your Huzzah to Io.adafruit

To connect your Huzzah to your io.adafruit account we will need to use MQTT.

Follow this tutorial: https://learn.adafruit.com/mqtt-adafruit-io-and-yo...

Following this tutorial will ensure we have all the necessary libraries installed.

Circuit Diagram

Circuit Diagram-01.png
IMG_1606.jpg
IMG_1737.JPG
IMG_1740.JPG

Construct the circuit illustrated to connect the servo and momentary button to the Huzzah board.

The momentary switch may require soldering. This is a good tutorial if you are new to soldering.

The resistor can be any value.

Program Your Huzzah

The code we are using is based on Adafruit's ESP8266 sample code. I have divided it into relevant sections if you need to modify it for your project.

Remember to replace the text in the code containing your:

  • Wifi network name
  • Wifi network Password
  • io.adafruit username
  • io.adafruit key (this can be found on your io.adafruit dashboard as pictured)

Downloads

Make a Flag

IMG_1789.JPG
Flag-01.png
IMG_1790.JPG
IMG_1803.JPG
IMG_1807.JPG

Download the flag image above. Print, fold, glue, cut and attach your flag to the servo with the screw included in the servo pack.

Or even better ... Use the illustrator file to create your own notification flag unique to your IFTTT trigger. Please share if you do!

Downloads

Enclose Your Circuit

IMG_1691.JPG
IMG_1743.JPG
IMG_1690.jpg
IMG_1701.jpg
IMG_1711.jpg
IMG_1713.jpg

Enclose your circuit in a container of your choice.

I used this project box from radioshack and drilled holes to hold the servo and button. Use callipers to measure the size of the components and drill appropriately sized holes.

In order to fit the components inside the small box I replaced the breadboard with a tiny protoboard and soldered the leads. This isn't necessary depending on the size of your enclosure

Please share the enclosure you make with me! Or If you 3D print an enclosure please upload the file and I will include it in the Instructable.

Done!

Screenshot 2016-12-07 19.26.31.png

You're done! Stick your Flag to the back of your computer, to the fridge, sit it on your desk or wherever ... and never miss anything important again!

Let me know what you use Flag for in the comments below!