What is PiCo?
PiCo is Morocco's open-source embedded electronics platform. Boards range from the beginner-friendly PiCo CORE (ATmega2560, Arduino-compatible) to the professional PiCo PRO (STM32H7 @ 480MHz). This learning path takes you from zero to building real projects.
Which Board Do I Have?
| Board | MCU | Best for | Arduino IDE? |
|---|---|---|---|
| PiCo CORE | ATmega2560 | Beginners, students | ✓ Yes |
| PiCo NANO | ATmega328P | Compact builds | ✓ Yes |
| PiCo WIFI | ESP32 | IoT projects | ✓ Yes (ESP32 core) |
| PiCo PRO | STM32H7 | Engineers, advanced | STM32duino |
Setting Up the IDE
PiCo CORE, NANO, and WIFI work with the free Arduino IDE 2. PiCo PRO uses STM32duino or PlatformIO.
1. Download Arduino IDE 2
Go to arduino.cc/en/software and download version 2.x for your operating system.
2. Install the PiCo CORE Board Package
Open File → Preferences and paste this URL into Additional boards manager URLs:
https://pico.ma/package_pico_index.json
Then go to Tools → Board → Board Manager, search for PiCo, and click Install.
3. Select Your Board
Go to Tools → Board → PiCo Boards and select your model. Select the correct COM port under Tools → Port.
Your First Sketch
Every Arduino sketch has two functions: setup() runs once on boot, and loop() runs forever.
// PiCo CORE — first sketch template
void setup() {
Serial.begin(9600); // open serial at 9600 baud
Serial.println("Hello from PiCo!");
}
void loop() {
// your code goes here — runs repeatedly
}
Upload with Ctrl+U (or ⌘+U on Mac), then open Tools → Serial Monitor at 9600 baud to see the output.
Blink an LED
The classic first project — toggle the onboard LED at 1-second intervals.
// Blink the onboard LED (pin 13)
const int LED = 13;
void setup() {
pinMode(LED, OUTPUT); // set pin as output
}
void loop() {
digitalWrite(LED, HIGH); // LED on
delay(1000); // wait 1 second
digitalWrite(LED, LOW); // LED off
delay(1000); // wait 1 second
}
Try changing the delay() values to make it blink faster or slower.
Temperature & Humidity Sensor
The PiCo LAB kit includes a DHT22 sensor. Install the DHT sensor library from the Library Manager first.
#include <DHT.h>
#define DHT_PIN 4
#define DHT_TYPE DHT22
DHT dht(DHT_PIN, DHT_TYPE);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
float humidity = dht.readHumidity();
float temperature = dht.readTemperature(); // Celsius
if (isnan(humidity) || isnan(temperature)) {
Serial.println("Sensor read error!");
return;
}
Serial.print("Temp: ");
Serial.print(temperature);
Serial.print(" °C | Humidity: ");
Serial.print(humidity);
Serial.println(" %");
delay(2000); // read every 2 seconds
}
Project: Weather Station
Combine the DHT22 (temperature/humidity), BMP280 (pressure), and the 16×2 LCD to build a complete weather station.
#include <DHT.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_BMP280.h>
DHT dht(4, DHT22);
LiquidCrystal_I2C lcd(0x27, 16, 2);
Adafruit_BMP280 bmp;
void setup() {
Serial.begin(9600);
dht.begin();
lcd.init();
lcd.backlight();
bmp.begin(0x76);
}
void loop() {
float t = dht.readTemperature();
float h = dht.readHumidity();
float p = bmp.readPressure() / 100.0F; // hPa
// Row 1: temperature + humidity
lcd.setCursor(0, 0);
lcd.print("T:");
lcd.print(t, 1);
lcd.print("C H:");
lcd.print(h, 0);
lcd.print("%");
// Row 2: pressure
lcd.setCursor(0, 1);
lcd.print("P: ");
lcd.print(p, 1);
lcd.print(" hPa");
delay(3000);
}