Getting the Arduino to send and Receive SMS’s
####Research
Arduino GSM Shield: PROS: The library is open source and the help section is self explanatory. The code (in C) looks familiar and easier to understand (as it’s deductive).
Cons: Required getting another SIM up running (ando) and since I wished my Arduino to do more than send SMS another module would have clogged it up. I could have ordered multiple arduinos but that seemed like an expensive proposition not to mention the difficulty in getting multiple arduinos to talk to eachother.
This app makes the process pretty simple. There’s a ready made app where you can customize the message that needs to be sent via the arduino. The interaction between the arduino and app is initiated through bluetooth. I’m not inclined to use it because I wont be doing enough work on my own.
Arduino Yun Sends SMS on demand
Required an Arduino Yun (basically an UNO with a wifi module so the Arduino connects to the internet).
Twilio
Instead, I try implementing Jonathan Gottfried’s tutorial on building a Lockitron with Twilio, Arduino and Node.js. It makes use of Twilio libraries in Node to communicate with an Arduino over SMS making it move a servo motor which unlocks the door. My thought is, perfect, I don’t need to buy a different Arduino or add modules to it, the barrier to entry should be low on this one and I get to get my hands dirty with Node.js.
First attempt:
I setup the tutorial to replicate what’s being done to understand the code so that I can modify it later.
Error
I get an error unfortunately,
“Most middleware (like bodyParser) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.”
So I checked the Github pages: https://gist.github.com/jonmarkgo/9061701 https://github.com/senchalabs/connect#middleware
And added the missing bundles using npm install commands. It still didn’t work, then made sure I had the right paths, made adjustments, still no luck. Then I looked at the body-parser library, added a new variable “bodyParser” and modified the callback for the express() function (declared as var app;),
And it still doesn’t work. I know I’m a little out of my depth here, but I tried making some sense and left it to try the next day. Unfortunately, the next day, it didn’t work again.
####Conclusion - doing Node.js labs
So this is the next step, I’m going to do the Node.js labs now to see if there is any conceptual understanding I can get out of this and maybe use Twilio and Express() on my own to write a program for my door knob.