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...
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Required Components
For the low low price of only $37.50 or less!
You will need...
Micro Servo $10
Resistor (any value)
Tiny Breadboard $4 (or protoboard)
Jumper Wires $2
Project Box $3.50
Lithium Battery (optional)
A Little Flag (we will make this)
Computer with Arduino IDE installed
Soldering Iron and Solder
Large and Small Philips Screw Drivers
Step 2: 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.
Step 3: Signup to Io.adafruit & IFTTT
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.
Step 4: 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.
Step 5: Circuit Diagram
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.
Step 6: 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)
Step 7: Make a Flag
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!
Step 8: Enclose Your Circuit
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.
Step 9: Done!
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!