Summer Camps 2025 registration is open — spots are limited.Reserve yours →
Tutorials

Learn with PiCo

Beginner to advanced. Bilingual resources in العربية, Français, and English.

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.

💡 If you have a PiCo LAB kit, you already have everything needed to follow every lesson on this page.

Which Board Do I Have?

BoardMCUBest forArduino IDE?
PiCo COREATmega2560Beginners, students✓ Yes
PiCo NANOATmega328PCompact builds✓ Yes
PiCo WIFIESP32IoT projects✓ Yes (ESP32 core)
PiCo PROSTM32H7Engineers, advancedSTM32duino

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:

text
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.

ℹ️ On Windows, install the CH340 driver if your board isn't detected. Download from pico.ma/drivers.

Your First Sketch

Every Arduino sketch has two functions: setup() runs once on boot, and loop() runs forever.

Arduino / C++
// 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.

Temperature & Humidity Sensor

The PiCo LAB kit includes a DHT22 sensor. Install the DHT sensor library from the Library Manager first.

Arduino / C++
#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
}
💡 Connect DHT22 DATA to pin 4, VCC to 3.3V, and GND to GND. Add a 10kΩ pull-up resistor between DATA and VCC.

Project: Weather Station

Combine the DHT22 (temperature/humidity), BMP280 (pressure), and the 16×2 LCD to build a complete weather station.

Arduino / C++
#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);
}