This sample enable you to control your GoPiGo with your Xbox controller. It demonstrates how to read inputs from the Xbox controller, translate these inputs as commands ('move forward', ' move backward', etc) and issue these commands to the GoPiGo robot.
This sample contains two projects: XboxControllerClient and GoPiGoXboxWebService. The XboxControllerClient is a foreground application written in C#. It is responsible for reading the Xbox controller's input and send it to GoPiGoXboxWebService. GoPiGoXboxWebService is a background application written in python. It exposes a WebAPI which takes the controller's input and issues commands to the GoPiGo robot.
Since XboxControllerClient is an universal application, it can be run locally on the Raspberry Pi or remotely on a PC. This is especially useful in the case of a wired Xbox controller -- you can connect the Xbox control to the PC and still control the Raspberry Pi / GoPiGo Robot via wifi. See configuration 2 - Running remotely.
- Raspberry Pi 2 or Raspberry Pi 3
- Dexter Industries GoPiGo Kit (http://www.dexterindustries.com/GoPiGo/)
- Xbox 360 controller for PC (wired or wireless)
- Set up your Raspberry Pi 2 or 3 running Windows 10 IoT
- Assemble your GoPiGo kit following Dexter Industries instructions
- Setup your PC based on the instructions here
- Power on your Raspberry Pi along with the GoPiGo Robot.
- Deploy and run the GoPiGoXboxWebService application to the Raspberry Pi.
- Connect the Xbox controller to the Raspberry Pi.
- Deploy and run the XboxControllerClient.
- Use the left thumb stick or the d-pad to control the GoPiGo Robot.
- Connect the Xbox controller to your PC
- Connect your Raspberry Pi to your wireless network.
- On line 23 of
XboxControllerClient\MainPage.xaml.cs, change thelocalhostto the IP of your Raspberry Pi. - Deploy and run XboxControllerClient on your PC
- Use the left thumb stick or the d-pad to control the GoPiGo Robot.