At work someone mentioned using a robot to distribute the Friday afternoon sweeties and I accepted the challenge. Already having a tank remotely controlled with a PS3 Controller I decided it would need a camera to see where it’s going. Having recently upgraded my phone I was able to use the old one with IP Webcam to share the camera feed over wifi.
When I stumbled upon a brief article on Let’s Make Robots about a LEGO robot with a wifi camera which is controlled by a custom Android App. I followed the instructions on the website linked in the article and had the proof of concept up and running with the free version of the app. Upon buying the Pro version of the app I was able to drive the tank around via bluetooth and simultaneously see the camera footage from the old phone over WiFi.
My configuration takes a Heng Long 1:32 scale Bulldog Tank base (chassis, motors, gearbox and treads) driven by a Dagu 4-channel motor controller (over the top in this instance but a common item now found in three of my robots) and controlled by an Arduino MEGA ADK (also over the top but I was using this for the USB Host aspect when the tank was operated by PS3 controller via bluetooth dongle). The bluetooth dongle has been replaced with a Bluetooth module for a simple serial link.
The Bluetooth module I have is only identified by the following address written on the back http://shop34694757.taobao.com/ and the label BT_Board v1.1. Thankfully I didn’t need to do much to make it work, just wired up the power (VCC, GND) and plugged the Tx and Rx of the bluetooth module into the Rx and Tx of the Arduino (crossed over so Tx talks to Rx and vice versa).
Servo added and the Arduino code updated I can now tilt the camera using some buttons on the BTBotControl interface.
A video has been uploaded to YouTube.
Where should I go from here?
- Overhaul Arduino sketch to allow for joystick control of camera angle (like a pan and tilt mode where horizontal joystick moves will rotate the robot but vertical moves only raise or lower the camera).
- Perhaps mount an Airsoft BB gun (I have the original one from the tank turret).
- Write my own custom Android app? Try piping control of the robot through the on-board Android phone, doing away with the mix of Bluetooth and WiFi. While I’m at it make more use of the Android, it has GPS, an accelerometer etc.
- Reversing view using phone’s second camera? Phone orientation means the rear-view camera is hidden in the holder.