-
Notifications
You must be signed in to change notification settings - Fork 3
Code Upload
Rick edited this page Oct 12, 2019
·
4 revisions
- Download and install the Arduino IDE. Make sure you get the correct one for your OS!
- Download code from here. Click
Source Code (zip)
to get the repository. Additionally, download whichever .zip file corresponds with your OS. You will need to extract theSumo-Competition-1.2.zip
file once you have it on your computer. You can placeSumo-Competition-1.2
and<your OS>.zip
wherever you like. - Open the Arduino IDE, and click on
Sketch
->Include Library
->Add .ZIP Library
and add theSparkFun_TB6612FNG_Arduino_Library-master.zip
from theSumo-Competition-1.2
folder. This is required for thesumo.ino
file to compile successfully. - Open the code for your robot: a file called
sumo.ino
inside a foldersumo
. Do not rename either of these, but you may edit the contents ofsumo.ino
if you would like to change how your robot responds. - Connect your computer to the Arduino board. Click on
Tools
->Board: ...
and select "Arduino Nano" from the list. Now click the right-facing arrow button in the upper left corner of the Arduino IDE to compile and upload your code.- NOTE: You might encounter problems here (Arduino Nanos are notoriously glitchy for code upload). Call over a GW Robotics team member for assistance, or try Googling the error message to debug it yourself!
NOTE: You will now need the wiring to be complete
- Connect to "HC-06" (or possibly "Unknown Device") on your laptop's bluetooth. Use the PIN code "1234".
- Open up
<your OS>.zip
and run the executable inside. You may need to disable your antivirus because it won't recognize the file. The program will scan your system for available serial ports and then ask you to select one. You may have to try multiple ports to find which one corresponds with the HC-06 bluetooth module. - Once connected, use the arrow keys on your laptop to control the robot.