Running your First Program¶
Before you begin, please make sure that you have completed all of the instructions on Setting up your Local Computer.
To turn on your RACECAR-MN, please take the following steps.
- Plug in the Xbox controller to one of the USB ports.
- Plug the two USB cables into the white battery.
- Connect the black car battery using the red banana connectors.
- Turn on your car using the switch. You should hear it beep once.
On your personal computer, please take the following steps.
- Make sure that your personal computer is connected to the same Wi-Fi router as your RACECAR-MN.
- Open a new terminal. If you are using Windows, you must use bash, not PowerShell or Command Prompt.
racecar setupto create your team directory on your RACECAR-MN.
racecar connectto connect to your RACECAR-MN. Once you connect, run
teleopand leave this terminal window open. The front wheels of the car should now be pointing directly forward and resist turning.
- Open a new terminal and enter
racecar connectto connect to your RACECAR-MN a second time. Enter
python demo.pyto run the demo program.
Your RACECAR-MN is now in default drive mode. You can accelerate using the triggers and steer with the left joystick. To exit the program, press the start and back buttons at the same time.