By Scott Barstow and Anders Brownworth
In early April I had the opportunity to participate in TADHack-mini London, an event focused on WebRTC. As I thought about what kind of project I wanted to build, I kept coming back to the idea of combining the Internet of Things (IoT) with WebRTC in some interesting way. I thought about a communication kiosk, and a host of other ideas, but decided that I wanted to build something with robotics involved.
I enlisted the help of a good friend, Anders Brownworth, and the question we decided to explore was: What could we create that you could send into a contaminated area to give you live video without endangering human lives?
We found some really fun parts on Sparkfun, bought a motor, and went to work. We mounted a Raspberry Pi on the robot and attached a camera to the front of the car. We used the Janus Gateway to stream live video from the camera over WiFi to our back-end NodeJS server. Since Matrix was a sponsor of the event, we wanted to use their technology to get messages to and from our robot. We created a simple chat room in TADHack sponsor Matrix and sent JSON payloads containing driving instructions to the car. We had intended to use Matrix for the WebRTC signaling but ran of time. We then used Socket.io to relay messages from the browser to Matrix, and on to the device.
In the end, our solution consisted of:
- A Raspberry Pi running Node 12 with a simple Node command line app to connect to Matrix and relay driving instructions to the motor
- A NodeJS server app that provided a gateway between the robot and the user interface
- A simple one-page web application with navigation buttons that the user could click to steer the car.
- A Matrix server to act as the message queue for the entire solution.
- While our project was a bit “out there” in terms of demonstrating real-life value (a stated TADHack goal), the idea of being able to send in cheap robots to disaster areas and help gather data is already being done today. For less than $100, we bought all of the hardware required, and within two days had a working prototype that could easily be extended to work with the cellular network to solve a real problem.
You can see the Matrix Bot in action by watching the video below. All of the code is available, for free, on Github.
As I prepare to head to Lisbon in June for the global TADHack event, I’ve got some new tricks up my sleeve. I’m excited to be a part of this next event in person, and to meet all of the amazing people I had a chance to watch in London.
I plan to be in Lisbon on Thursday ahead of the event, and would welcome the opportunity to meet up ahead of time and scheme about what cool, useful tech we can build.