Start with Arduino Primo

Connecting the Arduino Primo

Connect the Arduino Primo to your computer, using an USB cable. 
The USB cable provides the power and allows the microcontroller programming.  
To program the board uploading the sketches you need of a software called Arduino IDE.
The board is available from Arduino IDE 1.8.x  version, downloading the corresponding platform (Arduino NRF52) from the Board Manager.

First Configuration


Power the board and wait some time. 
Search the board in the network list, it has an ESSID like this: Arduino-Primo-xxxxxx.

Arduino Primo Access Point

Connect your PC/MAC to the Arduino Primo AP:

Connecting to Arduino Primo AP

Open a browser and connect at this address: http://192.168.240.1/

Access Point

This is the screen that it will appear: 

Arduino Primo Web Panel

If you want to modify the hostname of the board then click on CHANGE from OVERVIEW menu or select the WiFi on the left menu and insert a new name under HOSTNAME field and after click on CHANGE.

Arduino Primo Web Panel

Connect the Arduino Primo to yours Access Point Router, selecting your network from WiFi Connection Menu. Type the correct password and click on CONNECT, as shown in the below image: 

Connect the board

Accept the alert message:

Warning

When the board will be connected to the network, it will be shown the board ip address.
Now, connect the PC to the same board network and try to access to the board inserting the ip address on the browser. 
After click on WiFi in the left menu and change the wifi configuration mode switching to STA MODE, as shown in the below image: 

Push to STA Mode

Warning: 
It is important switching in STA MODE because so the board will be visible on the Arduino IDE and, furthermore, you will be able to protect it from possible attacks, since it will no longer be visible as open network.

Now your Arduino Primo is ready.

Use your board and upload the First sketch.
For more information, about how to upload the First Sketch, select the corresponding Tab in the top of the page.
Follow all steps of this guide to upload your first sketch on Arduino Primo.


Arduino IDE - download and install


You need of a software called Arduino IDE to program the board.
You can download it from here
After that you have downloaded the latest version Arduino IDE, extract it using 7-zip. 
Now double click to install it, if you have downloaded the installer file.

Note:

The board is available from Arduino IDE 1.8.x  version, downloading the corresponding platform (Arduino NRF52) from the Board Manager.

Only Linux Users


Before to use the board it needs to execute the attached script.
For more information visit here.


Launch the Arduino IDE


Click on Arduino icon to launch the IDE:
Arduino IDE
Wait the initialization.
It will appear a screen like this:

Arduino IDE 1.8.1


Connect the board


Connect your board to the computer using the USB cable, so the orange power LED (PWR ON) go on. 

Note: 
When you connect your board, pay attention that the cable is correctly inserted.

Download the platform


Important before to import the platform make sure that the board is connected to PC.
Follow these simple steps to import the platform on the Arduino IDE 1.8.x:
- Select Boards Manager... from Tools>Boards menu.

Board Manager

Search the Arduino NRF52 Boards platform. You can scroll the drop down menu or write the name in the top field of the page.

Board Manager

Click on Install.

After the installation the Primo will appear in the boards list

Programming via Serial


This is the classic procedure used to program the Arduino boards.

Select the board


Select the Arduino Primo from Tools>Board menu. 

Select the board

Note:
The board is available from Arduino IDE 1.8.x  version, downloading the corresponding platform from the Board Manager.

Select port


If the board is correctly connected to PC then it will appears in Tool>Port menu a device called for example COMxx(Arduino Primo) as shown in the below image, then select it: 

Select the port

Note:
If it doesn't appear as serial device then check the connection, try to change the cable or the USB port.

Open the Blink Sketch


Select the Blink sketch from File>Examples>1.Basics menu. 

Select the sketch

Upload the sketch

Now you can upload the sketch, clicking on Upload button as shown in the below image: 
Warning:
The LED_BUILTIN on the Arduino Primo is L9.

Blink sketch

Wait the end of uploading. 

Sketch uploaded

If the Uploading is correctly completed then the L9 will blink.

Now try to upload another example or try to create your custom sketch.

For other examples visit the tutorials section.

Note:

In Arduino Primo are been created some define that can be used in your sketches, below the complete list:


DEFINE

Pin

Note

LED_BUILTIN

9

LED_BUILTIN is the L9 Led onboard

BUZZER

35

Manage the buzzer onboard

USER1_BUTTON

34

used also in some Low Power library functionalities

USER2_BUTTON

44

It isn’t possible to attach an Interrupt

USER2_LED

38

User2 Led onboard

BLE_LED

40

BLE led onboard


For more information about the board look the below image and visit the Techical Specifics:

Primo Details
The Arduino Primo has a Web Panel that it can be reached in different ways: 

-  If the board isn't been configured yet, you can access inserting in browser this address: http://192.168.240.1/
In this case look the Getting Started guide to configure it. 

- If the board is been correctly configured then you can insert the ip address (xxx.xxx.xxx.xxx) or the hostname(hostname.local/) from browser.

The Web Panel has a simple menu that it is formed from two items: OVERVIEW and WIFI

The Home page of the Web Panel is the OVERVIEW. Here are shown all the informations about the board, in particular the hostname, the network SSID, the Wifi address and the Wifi mode:

Arduino Primo Web Panel
 
Selecting the WIFI section, you can change the hostname of the board, typing the new name in the dedicated field and clicking on CHANGE button, as shown in the below image: 

Arduino Primo Web Panel

It is possible to switch to STA MODE or STA+AP MODE clicking the specific button in the WIFI STATUS box.

Warning:

Keep in mind that it is advised to switch only in STA MODE because so the board will be visible on the Arduino IDE and you will be able to protect it from possible attacks, since it will no longer be visible as open network. 

Arduino Primo Web Panel

Furthermore from the WIFI menu you can connect the board at your network, selecting it from WiFi Connections field, inserting the correct password and clicking on CONNECT button. 

Arduino Primo Web Panel

In this section you can also choose if to use the DHCP or the Static IP, as shown in the picture:  

Arduino Primo Web Panel