loading

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!

Step 1: Required Components

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

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!

Having an issue with the flag activating at a specific time. It seems like if it sits idle (especially overnight) it does not respond. After I reset the power, it works fine. I ran some tests, it will still work after 4 hrs idle, but after 8 hrs it seems to stop. Have you seen this issue? Any input is appreciated. Thanks again!
<p>I've had some issues with the Huzzah disconnecting from wifi after extended periods of time. Can you check if the board is still connected to wifi after it begins sitting idle? I might need to alter the code to reconnect to the network every 4 hours. Cheers.</p>
Same thing happened again this morning. It still appears to be connected to the internet. When I open the serial monitor, this is what I get:<br><br>Connecting to MQTT... Not authorized to connect<br>Retrying MQTT connection in 5 seconds...<br>Not authorized to connect<br>Retrying MQTT connection in 5 seconds...<br>Not authorized to connect<br>Retrying MQTT connection in 5 seconds...<br><br>Soft WDT reset<br><br>ctx: cont <br>sp: 3ffef660 end: 3ffef850 offset: 01b0<br><br>Maybe an issue with the MQTT connection?
Sorry for the trouble! I will try to replicate the issue and look into it in a couple of weeks. Hopefully it is an issue that can be fixed in the code and not something inherent in MQTT. What IFTTT trigger are you using?
<p>I am using a simple Date and time trigger. It was working fine for a couple of days, but now kind of spotty, works when it wants to . I tried adding code to ping the MQTT server to keep it alive, but not sure if it made a difference. Sometimes it doesn't even activate when I turn it on from the adafruit io dashboard. Sorry, I'm a newbie at this, but having a lot of fun!</p>
<p>I will look at that next time it happens. One thing I did notice was the IP address changed the last time I reconnected. Thanks!</p>
<p>Changed up the orientation a bit. Made it so it would sit flat. The idea is that I put my pill bottle on top, and I set it to remind me to take my pill. Works great! Awesome idea!</p>
<p>Love it! Thanks for sharing! Great idea using it for the pill reminder.</p>
Thanks for the Pill Flag!! I'm definitely going to use it!
<p>Here's the new 'pill reminder' flag for you.</p>
<p>Voted!! Great idea and great instructions =D</p>
<p>This looks like such a fun project! I just ordered my first Arduino and have been looking for a good first project (that is also useful). This looks like it will be that project. Will report back when I have a working model!</p>
<p>Awesome Blaine! Let me know if you need any help. </p>
<p>tienes el codigo de esa programacion</p>
<p>Cool project, Louis! Your code uses two tabs, of which we are only shown one, could you attach your complete code folder as a zip file? Be sure to use placeholders instead of your personal wifi info or AIO key. I also spied a few typos ("Huzzar", "bellow", missing period), might want to give the copy another once-over!</p><p>Also I voted for you in the Arduino and IoT contests! To get more votes, you might include a temporary note in your introduction asking folks to consider voting for the project.</p>
<p>Thanks Becky! I've amended your notes, included the zip file and fixed the error in the circuit diagram. </p>
that is genius! you could also make it ringa a bell or somethjng, just an idea

About This Instructable

5,828views

92favorites

License:

Bio: Originally from New Zealand, I am currently living in New York pursuing my MFA at the School of Visual Arts Products of Design program.
More by Louis George:Notification Flag - Great Intro to Wi-Fi, IFTTT & Huzzah ESP8266 Design and Make your own Perfect Pen 
Add instructable to: