DSC_0307

Methods For Controlling Your Robot

In the buildup for PiWars, I have been looking at different methods for controlling my Robot, in this post, I will run through some different methods and their pros and cons in my opinion. Last year my robot PyroBot was controlled by a Canny Bot custom joystick controller or app, the robot side was dealt with a Canny Bots BlueBrain, a mini robot controller with BlueTooth LE, line following sensors and motor drivers. The BlueBrian was connected to the Raspberry Pi via the serial link. First we start with …..

Wireless Keyboard

Chances you already own a wireless keyboard, there are a number of styles, from full size to mini multi media. Programing for this type of control is fairly simple, for a guide on how too is available on the Pimoroni learning zone http://learn.pimoroni.com/tutorial/robots/controlling-your-robot-wireless-keyboard

Pros cost, simple programming in python, lots of keys!
cons you may need to use a second keyboard to stop running the program. speed control and steering is not as precise as a analog joystick. short range 15m or less.

Game Controller

 

Sony PS3 controller

It’s possible that you already have a controller at home, my favorite is the Sony PS3, you can also use a Xbox 360 controller or a Nintendo Wiimote controller. You will need a BlueTooth dongle for the PS3 and Wiimote, for the 360 controller a PC adaptor is required.

Sony PS3 controller: I would suggest following PiBorg’s guide for setting up your controller. their control software is an excellent example of using a PS3 controller, for more information see their website. www.piborg.org

I have only used a wired a 360 controller with RetroPi and have not used a Wiimote with a Raspberry Pi. however I found the following guides to get started.

Wiimote: https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/wiimote/
360 controller: http://www.stuffaboutcode.com/2014/10/raspberry-pi-xbox-360-controller-python.html

Pros good analog joystick control, python libraries available.
Cons cost if you have to buy a controller and dongle to buy, the Wiimote has only binary input, short range.

Radio Control

High end RC Transmitter

RC control is possible, but there is no simple cut and paste solution, you will need a receiver that can output the received signal as either an I2c or a serial link to work with a Raspberry Pi.

Pros great range.
Cons cost, no simple solution.

Web Interface

PiBorg Web interface

View real times images from your onboard Raspberry Pi camera, control your robot via your phone, tablet, PC or even a Raspberry Pi. It even possible to control your robot over the internet. To use a web interface, your device and Raspberry Pi will need to be on a common network and setup your router for external access to your network, if you want to control your robot over the net. It is also possible to setup your Raspberry Pi as an access point.  See the PiBorg website, for an example on how to control your robot via a web interface, look at the DiddyBorg Metal Edition pages at http://www.piborg.org.

for setting up your Raspberry Pi as an access point, see the post at http://www.penguintutor.com/news/raspberrypi/wireless-hotspot

Pros don’t need a keyboard or Joypad, you can view images from the Raspberry Pi camera.
Cons fine control is hard, you need a router, if your Raspberry Pi is not set up as an access point, control could be laggy if the network is poor.

Phone/Tablet app

 

There are many apps available for you phone or tablet some are even customizable. They connect via bluetooth or Wifi, search for Raspberry and Controller. You may wish to try this app from http://www.blynk.cc/ availble for both andriod and Apple devices.

Pros you don’t need to use a joystick or keyboard, some apps have feedback
Cons you need a BlueTooth or WiFi dongle, depending on the app, speed control maybe basic.

Links

cannybots.com

 

Acknowledgments

images of the joypads were taken from https://www.wikipedia.org/

the PiBorb web interface is from their website

and the picture of the keyboard is my own

 

3 thoughts on “Methods For Controlling Your Robot

Comments are closed.