top of page
Initial Setup for Programming SAMrI
These steps should only need to be done once to set up your system
Step 1. Download Arduino IDE

Downloard the Arduino IDE from https://www.arduino.cc/en/Main/Software  and install it on your Windows based computer.   You may agree to all it's default install options 

​

Note:  Install version for Windows 7 and up ( not the Windows APP version )

Arduino splash.png

Once downloaded, run the Arduino Software.

Step 2. Download and install hardware profile

The Arduino compatible microcontroller used on the SAMrI is a special variant that does not need to use an external crystal oscillator in order to free up a couple extra I/O pins!  

​

This "hardware profile" will describe the SAMrINO hardware to the Arduino IDE

​

  • Download and extract this hardware configuration archive: breadboard-1-6-x.zip 

  • Create a "hardware" sub-folder in your Arduino sketchbook folder (whose location you can find in the Arduino preferences dialog). 

​

​

​

​

​

​

​

​

​

  • Move the breadboard folder from the zip archive to the "hardware" folder of your Arduino sketchbook.

           Note: Not the breadboard-1-6-x folder... the "breadboard" folder inside that one.

  • Restart the Arduino software.

  • You should see "ATmega328 on a breadboard (8 MHz internal clock)" in the Tools > Board menu.

​

Sketchbook Preferences location.png
Breadboard tool selected.png
Breadboard tool.png
Step 4:   Replace the Header File

To enable PB6 and PB7 ( which the SAMrI needs ), you must replace the Arduino.h header file with this modified one. 

 

Simply download this ZIP file, extract it, and save the header (arduino.h) file to this location: 

 

C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard

​

The original header file must be removed and replaced with this one.

Step 3. Set up TinyISP programmer

Your SAMrI interfaces to the USB port of your PC using a device called a TINYISP.  It's a USB to ISP ( In-system-programmer ) device which connect to your ISP connector in the corner of the SAMrI.

​

When you first connect your TINYISP device to your PC, the PC may, or may NOT find the driver quickly.    If you need to download your own driver, you can easily find one at the adafruit site:

​

https://github.com/adafruit/Adafruit_Windows_Drivers/releases/tag/2.4.0.0  

​

​

​

tinyisp.png

Note concerning your USB cable:   Some USB cables are classified as "Charge Only" cables, and have no data leads so will not work with your SAMrI.    Make sure your cable is "CHARGE & DATA".   There is a great site here that describes the difference:

​

https://www.dignited.com/50330/usb-data-cable-vs-usb-charging-cable/ 

​

Step 5. Download and Run your first program!!

You're almost ready to download your first program!

​

Open the Arduino software, and load in the "blink" program found in the File menu as shown:

loading blink.png

Your "Blink" program should look like this:

blink program.png

Optional:  Under File -> Preferances  click the checkboxes to "Show verbose output during: "  to select compilation and upload.   This will give you more information during downloading.

In the "Tools" menu, make sure your board is the "ATmega328 on breadboard" and your Programmer is "USBtinyISP".   Select them if they are not.

Select hardware and programmer.png

Plug in the Purple Programming board ( AVR ISP ) to your robot and your computers USB port.

IMG_0733(1)_edited.jpg

From the " Sketch " menu, click on "Upload using Programmer".   This will being the compilation, linking, and downloading operation!

upload using programmer.png

When completed, you should see your lower arduino screen signal " avrdude done.  Thank you. "

uploaded successfully.png

Put an LED from output pin PB5  ( Arduino's refer to this pin as  LED_BUILTIN ) to a ground connection ( GND ) as shown here.

wire up the LED.png

TRY THIS:    Move the LED to PB1 ( instead of PB5 ) and try the Examples->Basics->Fade

If your light is blinking, CONGRATULATIONS  your SAMrI is working!

​

bottom of page