
If you are looking for a Arduino board that connects to the Internet via WiFi, use the technology of bluetooth and NFC, then the model Primo It's ideal for your projects.
This is due to its high-quality connectivity and other components that substantially improve its operability.One of those elements is the set of MCU that are used to maintain a good connection.
If you want to know how to work with a Arduino Primo boardYou will have to continue reading. We'll show you a list with the best ideas that you can do yourself.
What are Arduino Primo boards and what are these open-source hardware boards used for?
La Arduino Primo board It is a model that was developed in the United States and was launched in 2016. It features a 32-bit architecture in its controllers, 14 pins for digital input and output, and 6 for analog inputs..
It can create a wide variety of projects, especially those that include a batteryas it offers an infrared receiver and transmitter and a battery charger. It also includes a network board. WiFi and Bluetooth, so it can be working in IoT.
What are the special features of Arduino Primo development boards?
The most outstanding features you will find on an Arduino Primo board are the following:
- This plate is the size of 7,62 cm x 5,08 cm. and weighs 85 grams.
- It can connect to WiFi, through Bluetooth and through near-field communication technology NFC.
- It has 3 microcontrollersThe nRF52832, the STM32f103, and the ESP8266. These work as the main MCU of the board, for program debugging, and for WiFi connectivity, respectively.
- Has 14 digital pins input and output pins, 12 of which can be used as pulse markers or PWM. It also has 6 analog input pins.
- It has a connector MicroUSB, with an antenna for NFC, a buzzer and reset and power buttons.
- Also has a battery charger with a 64 MHz resonator.
- The voltage at which it operates is 3VTherefore, one must be careful of do not burn the components.
- Work with a WiFi protocol 11 bgn en 2.4 GHz of frequency.
Improved connectivity: How to best take advantage of this feature of Arduino Primo?
To make better use of the connectivity offered by the Arduino Primo board You will need to add the Arduino NRF52 Core board in the IDE.
You can do this by going to Tools, then selecting Boards, and finally choosing Board Manager:
- A new window will then open in which You will need to choose NRF52 Core.
- You should keep in mind that if you are working on a computer with an operating system Windows or MacOS you will not need to install driversHowever, if you use Linux you'll have to run the script You'll find it on the official website of arduino.
https://www.arduino.cc/en/Sh/Txt - After this, you will have to add the serial portTo do that, you will need to log in to the IDE and click on Tools and then in Serial port menu, where you will find the name of the port to which your board is connected.
- After uploading the environment (by clicking on Program and then in Go up), you will need Connect to the Internet via WiFiYou can do this by turning on the network adapter and then accessing the Network menu on your computer. You'll find it very easily. SSID, since it bears the name Arduino Cousin.
- In your browser, you will need to enter the address
http://192.168.240.1/so you can access the motherboard's configuration options. Then, you'll need to go to the menu Connection You'll need to enter your Wi-Fi password and then tap on CONNECT. - Lastly, The Arduino's IP address will appear.Therefore, you will need to change the status from the settings panel to SWITCH TO STA MODEThis way you can get better connectivity.
List of project ideas you can develop using Arduino Primo boards
Below you will find a list of the best projects you can do yourself with an Arduino Primo:
Heart rate monitor
You will be able to create using an Arduino Primo boarda pulse sensor for obtain heart rate information and the necessary cables for the connection. The first thing you should do is connect the sensor's PWR to 3.3V; then GND to the board's GND and the signal to channel A0.
Next, you will need to enter these programming codes:
#include #define SIGNAL A0 BLEPeripheral blePeripheral; BLEService heartRateService("180D"); BLECharacteristic heartRateChar("2A37", BLERead | BLENotify, 2); void findHeartRate(float averageSample); int sample[300] = { 0 }; int n = 0; int sumSample = 0; float averageSample = 0; void setup() { begin(250000); setLocalName("HeartRateSketch"); setAdvertisedServiceUuid(heartRateService.uuid()); addAttribute(heartRateService); addAttribute(heartRateChar); begin(); println("Bluetooth device active, waiting for connections..."); } void loop() { BLECentral central = blePeripheral.central(); if (central) { print("Connected to central: "); println(central.address()); //turn on BLE led digitalWrite(BLE_LED, HIGH); while (central.connected()) { if (millis() % 10 == 0) { int rawValue = analogRead(A0); int sensorValue = map(rawValue, 0, 1023, 0, 255); println(sensorValue); sumSample = sumSample + sensorValue; sumSample = sumSample - sample[n]; sample[n] = sensorValue; n++; averageSample = (float)sumSample / 300; if (n == 300) { n = 0; findHeartRate(averageSample); } delay(1); } } print("Disconnected from central: "); println(central.address()); } digitalWrite(BLE_LED, LOW); delay(200); digitalWrite(BLE_LED, HIGH); delay(200); } void findHeartRate (float averageSample) { int count = 0; int totalTime = 0; int lastI = 0; bool trendState = false; bool goOverThreshold = false; int heartRate = 0; float setThreshold = 1.25; for (int i = 0; i < 300; i++) { goOverThreshold = (sample[i] > (averageSample * setThreshold)); if (goOverThreshold != trendState) { trendState = goOverThreshold; if (goOverThreshold == false) { if (count > 0) { totalTime = totalTime + (i - lastI); } count++; lastI = i; } } } heartRate = 6000 * (count - 1) / totalTime; const unsigned char heartRateCharArray[2] = { 0, (char)heartRate }; setValue(heartRateCharArray, 2); //Serial.print("heartRate is: "); //Serial.println(heartRate); }
Mouse control via mobile device in a multimedia player
You'll need a button cell battery of type CR2032, a plate Arduino Primo Core and a mobile phone with Bluetooth activated.
When working with an IDE, you won't need any circuit board, so you'll just need to enter these codes directly:
#include #include #include #include #define MOUSE_RANGE 24 #define INT1 21 int tap = 0; int chrono = 0; int count = 0; BLEHIDPeripheral bleHIDPeripheral = BLEHIDPeripheral(); BLEMouse bleMouse; BLESystemControl bleSystemControl; void setup() { pinMode(LED_BUILTIN, OUTPUT); pinMode(12, OUTPUT); begin(115200); println(F("BLE HID Peripheral - clearing bond data")); clearBondStoreData(); setReportIdOffset(1); setLocalName("Arduino Core Mouse"); addHID(bleMouse); addHID(bleSystemControl); begin(); println(F("BLE HID Demo")); begin(); enableSingleTapDetection(); attachInterrupt(INT1, Tap, RISING); } void loop() { BLECentral central = bleHIDPeripheral.central(); digitalWrite(LED_BUILTIN, LOW); if (central) { print(F("Connected to central: ")); println(central.address()); count = 0; while (central.connected()) { digitalWrite(LED_BUILTIN, HIGH); if (tap) { tap = 0; uint8_t status = 0; getStatusSingleTapDetection(&status); if (status) { if (count % 2 == 0){ digitalWrite(12, HIGH); //turn on the led press(); count++; } else { digitalWrite(12, LOW); release(); count++; } } } int32_t accelerometers[3] = {0}; getAccelerometer(accelerometers); if (accelerometers[2] > 0 && (abs(accelerometers[0])>100||abs(accelerometers[1])>100) && (millis()>(chrono+200))) { int mappedX = map (accelerometers[0], -1023, 1023, -12, 12); int mappedY = map (accelerometers[1], -1023, 1023, -12, 12); int x = -1 * mappedX; int y = mappedY; move(x, y); }
Then Connect your mobile phone to the board via Bluetooth to start using the wireless mouse.
Weather sensor
This project is a bit more complicated than the previous ones, because You will need two Arduino boards, one Primo and one Primo Core. The latter is responsible for sending a signal to the former so you can search the web for the temperature of a specific city. In addition to the two panels, you will need a CR2032 and a smartphone.
You will need to connect the Arduino to its respective pins and continue entering these codes in the IDE:
#include #include #include BLESerial bleSerial = BLESerial(); char ssid[] = "cclIT"; char pass[] = "ht34!eG$"; int keyIndex = 0; int count; charmemory[5]; char fahrenheit[4]; char celsius[4]; bool flag = false; int status = WL_IDLE_STATUS; char server[] = "www.nytimes.com"; WiFiClient client; void setup() { setLocalName("WeatherFinder"); pinMode(BLE_LED, OUTPUT); begin(115200); begin(); memory[4] = '\0'; fahrenheit[3] = '\0'; celsius[3] = '\0'; } void loop() { poll(); if (bleSerial && Serial) { int byte; if ((byte = bleSerial.read()) > 0) { if (WiFi.status() == WL_NO_WIFI_MODULE_COMM) { println("Communication with WiFi module not established."); } while (status != WL_CONNECTED) { print("Attempting to connect to SSID: "); println(ssid); status = WiFi.begin(ssid, pass); delay(10000); } println("Connected to wifi"); println("\nStarting connection to server..."); if (client.connect(server, 80)) { println("connected to server"); println("GET /gst/weather.html?detail=Cagliari--IY HTTP/1.1"); println("Host: www.nytimes.com"); println("Connection: close"); println(); } flag = true; } } while (flag) { while (client.available()) { char c = client.read(); if (c == 176 && count < 2) { if (count == 0) { fahrenheit[0] = memory[0]; fahrenheit[1] = memory[1]; fahrenheit[2] = memory[2]; } else { celsius[0] = memory[0]; celsius[1] = memory[1]; celsius[2] = memory[2]; } count++; } memory[0] = memory[1]; memory[1] = memory[2]; memory[2] = memory[3]; memory[3] = c; } if (!client.connected()) { println(); println("disconnecting from server."); if (fahrenheit[1] == 62){ fahrenheit[1] = 32; fahrenheit[0] = 32; } else if (fahrenheit[0] == 62){ fahrenheit[0] = 32; } if (celsius[1] == 40){ celsius[1] = 32; celsius[0] = 32; } else if (celsius[0] == 40){ celsius[0] = 32; } print("Temperature in fahrenheit: "); print(fahrenheit); println("°"); print("Temperature in celsius: "); print(celsius); println("°"); stop(); write(celsius); flag = false; } } if (bleSerial.status() == ADVERTISING) { digitalWrite(BLE_LED, LOW); delay(200); digitalWrite(BLE_LED, HIGH); delay(200); } else digitalWrite(BLE_LED, HIGH); }


















