For this final I wanted to create a “simple” project made complex via integrating the “Internet of Things”. Drawing inspiration from the Rube Goldberg midterm, I sought to make a Rube Goldberg machine that was instigated via IoT, and at some points facilitated by IoT. Essentially, this machine would be ignited by turning on a button, which would then connect to twitter and tweet. This tweet would be read by the MAKR1000, and then an actuator would activate the next phase in the Rube Goldberg machine. This process would cycle about three times before finally turning an LED on, and tweeting something along the lines of “Hey, the LED is on”.
WHile such a machine would be a huge hardware concern, it was more difficult for me to configure the micro controller with the MAKR1000. Not only because of the technique, but also because there were no MAKR1000s left for me to use. After fooling around with Ethernet shields and and Arduino Yun, I was introduced to the Particle Photon micro controller – a godsend. After learning how to use this board (which was a lot, considering it has little but significant differences from typical Arduinos) Fortunately, there are many online resources for how to use the Photon in an IoT situation.
Ultimately, I decided to connect the particle to Thingspeak, and use Thingspeak as a medium to connect with Twitter. Thingspeak is an online repository where people using internet boards (such as the ESP8266) can save information. In addition to its data storage and visualization, Thinspeak offers built in applications for connecting to Twitter. By using Thingspeak’s applications ThingtTweet, ThingControl, and ThingHTTP, I was able to scrape my twitter account for certain filters or trigger (in this case, “#Thingspeak” as a filter and “blink” as a trigger). This made it such that if i tweeted a message with both the filter and trigger, this would be written to Thingspeak, which in turn would trigger my Photon. when I typed in a tweet with the same filter and the trigger “led”, this would tell my Photon to turn off the mechanisms.
This meant that I could activate the Rube Goldberg mechanisms from twitter. However, I still needed a way to tweet. The cool bit about this was that I used the Photon to directly tweet, via the TCP client library. After some technical difficulty and another few learning curves, finally it all came together. I had the code working such that if I typed in the filter and trigger, as stated above, the photon would turn on one motor, then another motor, and finally light up an LED, before tweeting “#thingspeak led”. Once this tweet was sent, the Photon would scrape that tweet from twitter, and know to turn itself off.
Now the next part was building a physical housing. I knew that I wanted gears, pistons, smoke, and an LED. The idea was, when the trigger was activated, the first motor would turn the gears and send a tweet saying “gears are on”. Then the pistons would turn, and also send a tweet. Next, the smoke would turn on and tweet. Finally, the LED would turn on. Due to logistical difficulties, I had to dismiss the smoke, but kept the pistons and gears. Using Illustrator, I designed the SVG case for my animatronic. I iterated through it twice, and eventually had a working model.
Overall, this was a great assignment and fun exercise. It was very challenging, but fortunately the resources were available to me. It would be fun to pursue this a little further, and get the machine working well with the smoke. But for now, I am happy with how the machine turned out.