For my week 5, I set out to finish up what I missed the previous week. I needed to set up a raspberry pi system that could activate electronic components when a certain SMS message is sent.
To accomplish this I followed a tutorial I found online. However, while working through it, I found that the tutorial was rather dated, and a lot of the parts of it had changed. Not drastically, but a lot of the resources I needed to use were different now in appearance and function.
Overview
The basic process was completed as follows. Set up a raspberry pi with Node Js, I was going to use Python, but my previous experience with JS made it the better choice. Node JS allows a raspberry pi to use the packages I was going to need.
Once the Pi was set up, I set up a twilio account with webhooks that routed through my local IP address. These webhooks send information through my Pi so it can be triggered if the correct SMS message is sent.
I then needed to add a port forward to my router. This allows information from outside my LAN to be sent into the raspberry pi. Without adding a port forward, the webhooks would never manage to reach the pi and it would not work.
Finally, I made a simple LED circuit that would turn on when the correct SMS message is sent.

Time Management
Goals:
Make simple raspberry pi SMS service: 6 hours
Actual:
9 hours
When I dove into the tutorial I expected challenge of course because a lot of this was new to me. I did not expect an outdated tutorial to fight me. One element that caused the most pain was installing a node packet called rpi-gpio. This packet allows JavaScript to use the raspberry pi’s pin system. However, apparently this packet had not been updated with raspberry pi’s os and the newest Node JS package. As a consequence, my script ran fine and received my SMS messages, but the pins wouldn’t turn my LED on. I ended up having to find a different packet to accomplish the same thing and change the code to run the pins. Every package library has different syntax to accomplish the same thing. Eventually after 4 tries, the package Onoff turned out to work flawlessly.
