Sticking a smartphone a remote controlled vehicle and having it stream camera video over WiFi lets you have lots of fun driving the vehicle with its remote while viewing images from it on another device and using the vehicle's own remote control. You can even do this where there is no WiFi access point with a hotspot on the phone or laptop (even if the phone or laptop has no Internet connection). And you can control your phone's flash for use as a headlight. All this uses simple off-the-shelf software, but I'll describe it in the first two steps.

Problem: But what if your vehicle is, like the Roomba, controlled by a line-of-sight (or close to line-of-sight: the light will bounce off walls to some degree) infrared remote? Sure, you could make sure that your vehicle is always within sight, but then what's the point of first person driving if you can see the vehicle?

Solution: Stick an infrared emitter dongle in the phone's audio jack and make an open source app -- IR Server -- that lets you control the vehicle (or any other IR-controllable device) via a web browser. Now you can use your laptop (or tablet or other device) both to steer and to view the video.

That's what I did, using an Android phone with two infrared controlled vehicles: a Roomba 530 and a bulldozer from the kids' Thames and Kosmos Remote-Control Machines Set. And of course now that I've done it, you don't need to write the app. If you just want to drive a 500-series Roomba or a Thames and Kosmos machine, you can just use my IR Server app. If you want to drive some other infrared-controlled vehicle -- or just control your TV via a browser! -- then you just need to modify one of the html files that IR Server uses for controlling.

My IR Server app is still a work in progress, which is why I am only making an apk available on github rather than putting it on Google Play as yet. I have the occasional hiccup with it.

What you need:

  • Android device with camera
  • Webcam app: I use the free version of IP Webcam; if you prefer open source, there is SpyDroid
  • IR Server app (source code and binaries here)
  • Audio jack infrared emitter: I used one from a defunct Griffin HeloTC; you can buy a cheap IR blaster; you can also make your own but the Griffin worked more reliably for me (newer phones have built-in support, but I don't have such a phone so I didn't add support for that)
  • Remote controlled toy
  • Optional: Way of capturing IR signals (I won't describe this, as the hardware you have probably differs a lot from mine)

Step 1: First-person view only: Simple version

The simplest first-person driving solution when you have a WiFi connection is just to attach a phone running webcam server software (I use IP Webcam; the free version does the job) to the toy. My Galaxy S2 phone fits neatly behind the bumper of my daughter's toy truck, and a single rubber band holds it nicely in place.

To view the images from the webcam for first-person driving, configure your webcam server software. I recommend using no higher than 640x480 resolution, a fairly low quality (30-50 in IP Webcam), and a frame rate of no more than about 20. With higher settings, lag can be annoying. Make sure the port number is set to 8080 (this will matter for IR control). Then start the webcam server (big button at the bottom of the settings screen in IP Webcam) and it should show on the screen the address to put into the other device. Then just point a web browser on a computer, tablet or phone on the same WiFi network to that address (with IP Webcam, you'll have to choose "Browser" or "Flash" or some other option--I recommend "Flash"--before you see the video). Or you can use a webcam viewing app like tinyCam Monitor (the free version works fine for me) on an Android device.

Then use the original remote control for your toy along with the device you're viewing the driving in.

A cool thing about IP Webcam is that it supports turning on your phone's flash, which you can use as a headlight for exploring dark closets. (In tinyCam Monitor you can activate this option by touching the horizontal three dots until it appears. In a web viewer, there is a button for that.)

<p>really neat mod. going to have a go with my old (half dead) roomba. May try the serial interface, think there may be more options for controlling different parts / interrogating sensors</p>
<p>Serial is better, but you'll need a phone with USB host and a USB to serial adapter, one of the Bluetooth Roomba or serial adapters, or a Brainlink. I picked up a Brainlink when SurplusShed had them on sale for $20, and they're great for driving a Roomba via Bluetooth and serial port. </p><p>You get a lot finer control over serial. You can turn the vacuum on and off, control the speed and access all the sensors. And it's pretty easy.</p><p>By the way, here's a handy hint: an S-video cable can be repurposed as a Roomba serial cable if you remove the plastic block from the plug.</p>

About This Instructable


131 favorites


More by arpruss: Photos from phone to Minecraft Star Wars and Star Trek in Minecraft with Raspberry Jam Mod A rainbow of fractals in Minecraft
Add instructable to: