The Challenge
I wanted this to be a rapid project, I knew the pumpkin carving would take time and I only had a few spare hours. So, I set myself a time limit: A working IoT pumpkin within 2 hours - something fun AND worthwhile. Because why do a prototype if it doesn't bring delight to those using it!
Getting Started
The photon board comes in a nicely designed little box with enough extra components to make your first project. The board came into it’s own with the setup. Usually with Arduino there’s a lot to set up and learn, It can be a tough onboarding experience for those brand new to hobby electronics. (There are lots of helpful tutorials, though!)
The Photon board is totally different; just power it up though USB, open the app on your phone and you’re already away. A quick entry of your WiFi settings and it’s set up ready for your first project. Using the supplied LED, you can use your phone to make the circuit and light up the LED. I had success within 5mins of opening the packaging. The App shows how and why this happens, really great for those starting to learn the fundamentals behind development.
Ideas
After few more tutorials under my belt, I started thinking about using twitter and Instagram hashtags to turn the pumpkin lights on. A fairly simple approach, however, I knew it would easily showcase the power of IoT without being over complicated.
The Plan
I’m a big fan of If this then that ( IFTTT ). It’s an online service using logic if THIS happens then make THAT happen. I knew IFTTT would be a simple and quick way of searching Twitter and Instagram for a particular hashtag, the ‘THIS’. I started looking into what ‘THAT’ I could use for my Photon board. I saw some options, however, they were mostly slightly more technical than I had the time and skills for. I’d have loved to use a node.js app or MQTT, however that was a little out of my reach. So I just used the pre built ‘THAT’.
Getting IFTTT to talk to the Photon this way is very simple, it’s mostly handled by magic*. All I needed to do was make sure everything was named correctly and I’d copied and pasted the correct bits of code. I told the Photon to power up a chosen section of the board when a tweet arrives.
The photon comes with a breadboard, this is basically a quick and easy way to connect electronics together without the need to solder anything together. I added few LED’s to the selected section with resistors, taken from their tutorial, and I was ready to test it all out.
*Yes I know it’s not actual magic.. It’s a mix of hosted code repo’s and online developer environments…