Getting Started with Arduino Programming for team9960

Print Friendly, PDF & Email

For our Arduino based robot project here at team9960, we will be using the Arduino Nano board as the robot brain.

Because you all have Chromebooks provided by your school, we will use them for writing programs and downloading them into the Nano. The normal Arduino software development environment runs on a regular Windows PC, but not on Chromebooks. So instead, we will use a subscription service from codebender.cc.

To access the development environment on your Chromebook, you will need to get the URL for our private subscription from Mr. Nelson and save it as a bookmark.

When you browse to this URL, you should see a window that looks something like this:

The first thing you must do is to download the Codebender app and install it in your browser. This only needs to be done once. Near the top center of the browser window is a box that says “To program your Arduino.” Click on the down arrow to the right of this box to scroll down to the blue link titled “Add it to Chrome.” Click this link to go to the Codebender App page in the Chrome App store:

Depending on your screen size, you will probably have to scroll the window to the right to see the “ADD TO CHROME” button:

Click on the button, then click “Add app” in the popup window. The app will install in your Browser and provide the capability to link the Arduino board to your Chromebook through USB.

Return to the codebender:edu web page. Now, you should see somewhat different information in the top bar:

At this point, connect your Arduino Nano board to the Chromebook using a standard USB to Mini USB cable. You should see some LEDs light up on the Nano and the bar in the browser should show a port available (mine usually shows /dev/tty/USB0). In the dropdown list titled “Please select a board,” Choose “Arduino Nano w/ ATmega328.” If this does not work, your cable or software installation may not be correct. If it did, you are ready to begin programming your Nano!

On the Codebender top bar at the far right is a menu symbol:

Click it and choose “Load example”, then “Blink.” The code editor window should now contain a program like this:

On the Codebender top bar at the far right are two round green buttons:

The left one compiles the program, checking it for errors, but does not download it. The right one with the arrow compiles and downloads the program to the Nano. Before downloading, look at the Nano board and the four LEDs located on it. Looking at the Nano board with the USB connector on the top and left end, there is a vertical row of 4 LEDs: The top one is labeled Rx, the next Tx, then POW, and L. The colors of these LEDs vary with the manufacturer of the Nano board. When you click the green arrow on the Codebender bar, you should see the Rx LED blink rapidly for a short while and then the L LED should begin blinking on for 1 second, then off for 1 second, repeating indefinitely. If this happens, you have been successful at compiling and downloading your first Arduino program!

Just for fun, change the delay statements in lines 23 and 25 in the program. Try changing line 23 to read “delay(100);” and click the program download command again. Now the LED should turn on for a tenth of a second and then off for 1 second as before. Try other combinations to give you some practice in changing and downloading programs.