Controlling your robot from a remote computer
The next step in constructing your laser tag playing robot is to add the remote control. You'll first need to add the ability to control Raspberry Pi via a WLAN connection. As noted in Chapter 1, Adding Raspberry Pi to an RC Vehicle, the section, Accessing the RC Car remotely, showed you how to add a WLAN interface as an access point. To prepare for the next section, you will want to configure two Raspberry Pis with WLAN, one as an access point and other that you'll connect to the access point. You'll also connect a USB web camera to Raspberry Pi on the wheeled robot for control. Finally, when you have logged in to Raspberry Pi, this will function on the remote computer. Log in to the second Raspberry Pi on the wheeled robot by typing ssh –X pi@xxx.xxx.xxx.xxx
, where the xxx.xxx.xxx.xxx
is the IP address of Raspberry Pi on the wheeled robot.
You can now luvcview to see the output of the webcam and you can run the input.py
program to control the...