20,000 Text Messages Under the Sea with OpenROV, Node.js and Twilio
Time to read: 2 minutes
Meet Rovie. Rovie is our underwater robotic friend here at Twilio:
Over the past couple months myself and fellow Developer Evangelist Brent Schooley have been teaching Rovie to swim and send underwater pictures whenever she gets a text message. Last week at That Conference we took Rovie to her first party and he enjoyed swimming in the beautiful pool at the Kalahari Resort with 500 of her closest friends.
Building Rovie
Rovie is an OpenROV – an open-source, low-cost underwater robot for exploration and education. One of my favorite things about working with an OpenROV is that the cockpit software is a Node.js application. When we wanted to modify Rovie to receive text messages we immediately opened up the cockpit application and started poking around.
Rovie’s cockpit application uses Express which made it really easy for us to add a new route that Twilio would be able to send a request to whenever an incoming message arrives at Rovie’s phone number::
Here we tell Rovie to snap a picture and then respond with some TwiML that sends the picture back to whoever texted in.
Before we could run this code we needed to make this route publicly available using one of my favorite tools – ngrok. You may know ngrok as a super rad command line script that you run to open up your localhost to the outside world. But there’s also a Node.js module for ngrok that lets us open up a new ngrok tunnel directly from within our application:
That’s all the code we needed. Here are a couple pictures from Rovie’s big swim courtesy of the That Conference flickr album:
What’s Your Summer Hack?
It’s been hot in New York City and hacking on an underwater robot has been the perfect way to cool off. Are you working on any great summer hacks? We’d love to see them! Find us on Twitter (@rickyrobinett and @brentschooley) or say “hi” in the comments.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.