Beginners Series Lesson 0: Upload

IMG_1815

Materials

Before you get started, make sure you have the following:

  • SmartInventor Board
  • Bluetooth Board
  • 4-pin Connector
  • Micro USB Cable

Additionally, make sure you’ve installed the software in the Installing Software guide.

Getting into Upload Mode

  1. Make sure your SmartInventor Board is connected by the 4-pin connector to the Bluetooth board.  The Bluetooth board should then connect through the Micro USB Cable to your computer:

IMG_1323

2.     Next, make sure your dipswitch 1 is ‘on’, and switched 2 and 3 are ‘off’ on the Smart Inventor board. Hit the reset button (the small black button located  right under the switches). A single blue LED light should begin blinking on your Smart Inventor board after a few seconds:

Dipswitch

3.     Next, press the small black button on your Bluetooth board twice quickly.  The LED light should begin blinking red twice in quick succession.

Uploadbutton

These are the two lights that should be continuously blinking:  Red blinks twice, blue blinks once.

IMG_1346 2

You’re now in uploading mode!  Remember, any time you want to upload code to your CoDrone you have to put the controller into uploading mode.

Uploading your Code

  1. Now that we’re in upload mode, we can finally upload our code.  Lets open up Arduino:

BoardCom

 2. The first thing we need to do before uploading our code is to ensure that we have selected the proper board and port.  At the bottom right of your Arduino window, the current board and selected COM port is shown (Above image boxed in red).  CoDrone boards are Rokit SmartInventor-mega32_v2

To select the Rokit SmartInventor-mega32_v2 Board, navigate to and select:

Tools > Board > Rokit SmartInventor-mega32_v2   (Might have to scroll down a bit)

Board

Now, make sure you’re connected to the right PORT.  The COM Port is related to which USB slot on your computer the controller is connected to:

Tools > Port > Your COM Port  (usually it will be the only port that shows up)

Ports1

Now the bottom right of the window should say something like:
Rokit SmartInventor-mega32_v2 on COM 4  (but the COM might be different)

After your port and board are set properly, click the “Upload Button” to begin the upload:

Ports

Note: There isn’t actually any code being uploaded here – we just want to test to make sure your board is properly connected and is able to communicate with your computer. If everything went well, the bottom console should say “Done Uploading”.

Done-Upload

Then you’re finished!  Follow our coding tutorials to learn how to code.  Remember to exit upload mode after you successfully upload your program to run them (put dip switch 1 back down).

Activity: Your First Upload

Copy this code to your Arduino IDE and upload it to your controller:

Your controller’s left and right LED lights should be bouncing back and forth if you successfully uploaded.

Next, we’ll learn how to setup your own CoDrone code.

Troubleshooting

We’ve included a couple of resolutions below for problems that users going through this particular lesson have run into. For the full troubleshooting guide, click here.

My code isn’t uploading 

If your code successfully compiles but won’t upload, there could be a few reasons:

  • Make sure your controller is in upload mode.  To review how to get into upload mode, go here.
  • Try a different cable.  The upload cable is a standard USB to micro USB cable.
  • Remember to pick the right COM port.
  • Unplug and replug the USB cable and try again.
  • Make sure your controller is in upload mode. If you’re having trouble getting your controller to go into upload mode, the section directly below this covers how to troubleshoot that problem.

 

The Controller (Smart Inventor Board) doesn’t go into upload mode

If the SmartInventor board is in upload configuration (dipswitch 1 up) but not in upload mode, try hitting the reset button until it goes into upload mode.

The Bluetooth Board doesn’t go into upload mode

If the bluetooth board does not enter upload mode, restart the controller by turning it off, then turning it back on. From there, double click the small black button located on the bluetooth board to put it back into upload mode.

My controller can’t go into upload mode and the LED lights turn on when the IR sensors are covered

This means your board was accidentally factory reset.  Due to the hardware and software requirements, the original firmware can only be uploaded on-site at Robolink.  Contact info@robolink.com for details on replacing your board.