How to program an Arduino Primo Core using an Arduino Primo

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 Arduino Primo for programming an Arduino Primo Core.

Hardware



Circuit


Use a SWD connector to connect the Arduino Primo Core to the Arduino Primo.
After plug-in the Arduino Primo to PC using an USB data cable.

Warning:
Check that the button on the Arduino Primo Core is in ON Position.

IMG_20170525_180159.jpg


Code

Launch the Arduino IDE, select the port relative at the Arduino Primo and use the Arduino Primo Core  as board.
Now upload your code.

In this example will be uploaded a simple Blink.

Warning:
Use the Arduino IDE 1.8.x and check that you have already downloaded the corresponding platform (Arduino NRF52 Boards) from the Board Manager.


/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6, on Primo on pin 9. LED_BUILTIN is set to
the correct LED pin independent of which board is used.

This example code is in the public domain.

modified 8 May 2014
by Scott Fitzgerald

modified 2 Sep 2016
by Arturo Guadalupi

modified 8 Sep 2016
by Colby Newman
*/
// 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 run on Arduino Primo Core.


BLink.jpg