There's a big difference in knowing that something can be done, and actually doing it. Although I'm not a programer by trade, I've programed quite a bit, mostly VB6 and VBA. I've dabbled a bit in other environments, but really not much more than your standard "Hello World" type of program. So when Dana asked me if I could make a mousepad send a text to a mobile phone using a Raspberry pi computer, I said, "of course!" I know now that I made it sound a little too easy because, although Dana was patient, she did ask for progress updates on a regular basis.
To Know Pi is to Love Pi
In my mind, I figured I could put a small tactile switch under the mousepad, connect it to the Raspberry Pi, write a little Python script to monitor the switch, and when it detected a change, send an email out to my phone. Yup, easy as Pi. In my lab, aka Dexter's Weird Science Laboratory, I have gadgets, widgets, and components of all sorts. It only took a few minutes to assemble a testing circuit with a tactile switch and a Raspberry Pi on a breadboard. Making it actually work was a whole different story.
While I am very familiar with Raspberry Pi computers, I use them for 3D printing, astro photography, and such, I don't actually know how to write Python scripts. Well I did write one that said "Hello World" once. Oh and there is the one that takes photo when I tap the enter key on the keypad, but that is all the real experience I have with Python. If you read Erin's post last week, you'll know that she's an expert Googler. Now it's my turn to exercise the old research skills, but I prefer the more nerdy DuckDuckGo search engine, running of course in my Firefox browser. My searching quickly resulted in a small script to monitor the switch, but getting Python to send out an email was not so easy. After a bunch of searching, and seeing that the methods were over my head at this point in my Python career, I stumbled across a comment where someone suggested using NodeRed, which was already installed on the Raspberry Pi.
I'd never heard of Node Red before, but reading the comment, I figured it couldn't be that hard. I learned that NodeRed is a drag and drop programming tool has a browser-based editor that makes it easy to create flows using the wide range of nodes that can be deployed to its runtime in a single-click. the runtime is built on Node.js, which I had actually read about once. There are many cool things about Node.js, like portability and interoperability. But for me, the coolest part is that there are nodes already written to do just about anything you want to do. In NodeRed, There are nodes to monitor input pins, nodes to trigger output pins, nodes to gather information, nodes to interact with social media, even nodes to send email. JACKPOT! It took me a few weeks to get all the pieces working together.
Persistance and Willingness to try...
Finally came the day that I told Dana and Erin that they were about to get a text from my Raspberry Pi prototype. And when they got the message, they were both like, "Well dang! We got ourselves a business to build." I knew that it was possible to make a mousepad talk to a cell phone, and I had a reasonable idea of how it could be done. But the solution that I eventually came to is nothing like I had originally imagined. Thanks to good research skills, persistence, and willingness try new ways of doing things, we have a functioning model that works better than expected.
Dana asked if I could build two functioning demo units that we could use for presentations to interested audiences, investors, and potential business partners. "Of course," I said. I know it can be done, but actually doing it ...
Chief Technology Officer