How to program an Arduino Primo Core using an external Programmer

Description

The Arduino Primo Core is a compact Arduino board with Bluetooth, developed in cooperation with Nordic and ideal for wearable.

This little board can be programmed in different ways, using:

  • the Bluetooth;
  • an external programmer, for example Atmel ICE;
  • an Arduino Primo.

In this tutorial is shown how to use an external Programmer, in particular an Atmel ICE, for programming an Arduino Primo Core.

atmel-ice.jpg

Hardware

Circuit


Put the coin battery in the corresponding slot in back of Arduino Primo Core.
Check that the button on the Arduino Primo Core is in ON Position.

ON.jpg

Use a SWD connector to connect the Arduino Primo Core to the Atmel ICE and finally plug-in the Atmel ICE to PC using an USB data cable, as shown in the image below.

IMG_20170606_095103.jpg

Code


Launch the Arduino IDE, use the Arduino IDE 1.8.x and download the latest version of Arduino NRF52 Boards  platform  from the Board Manager.
Select the Arduino Primo Core  as board and upload your code.
In this example will be uploaded a simple Blink.

Note:
It doesn't need to select the port in the Arduino IDE if you are  using an external programmer.

// the setup function runs once when you press reset or power the board

void setup() {

 // initialize digital pin LED_BUILTIN as an output.

 pinMode(LED_BUILTIN, OUTPUT);

}

// the loop function runs over and over again forever

void loop() {

 digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)

 delay(1000);                       // wait for a second

 digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW

 delay(1000);                       // wait for a second

}

Output


Look the sketch that runs on Arduino Primo Core.

BLink.jpg