🛠 Faire clignoter une LED sur les broches du coprocesseur
Objectives
Understand the architecture of the LattePanda Alpha: an x86-64 computer (Intel Core m3-7Y30, Kaby Lake, 2 cores / 4 threads, 8 GB RAM) paired with an ATmega32U4 coprocessor identical to the one in an Arduino Leonardo, which controls the GPIO pins of the two 50-pin connectors. By the end of this tutorial, you will know how to install the Arduino IDE, select the correct board, and blink an LED on an Arduino-compatible pin.
Hardware
- LattePanda Alpha running Windows 10/11 or Linux (the coprocessor is visible from both sides)
- 12 V / 3 A power supply (JST connector) or 45 W USB-C Power Delivery adapter — official documentation requires 12 V/3 A
- 1 LED + 1 330 Ω resistor, breadboard, jumper wires
- Wiring: LED anode to pin D13 of the 50-pin connector (Arduino-compatible pin), cathode to the resistor, then to GND
Complete Code
// Blink.ino — à téléverser sur le coprocesseur intégré
// Carte Arduino IDE : "Arduino Leonardo" (c'est l'ATmega32U4 de la LattePanda Alpha)
const int LED_PIN = 13; // broche numérique compatible Arduino sur le connecteur 50 broches
void setup {
pinMode(LED_PIN, OUTPUT);
}
void loop {
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
In the Arduino IDE, the coprocessor appears on the internal USB: COM port on Windows, /dev/ttyACM0 on Linux.
Expected Verification
The LED blinks every 500 ms, independently of the operating system: the program runs on the ATmega32U4 even if you close the IDE. The serial port disappears/reappears in the device manager during upload — this is normal for a Leonardo.
Common Errors
- Wrong board selected in the IDE: you must select "Arduino Leonardo", not "Arduino Uno" (the bootloader differs).
- LED inserted backwards (the short leg is the cathode, ground side) or missing resistor.
- On Linux, user not in the
dialoutgroup:sudo usermod -aG dialout $USERthen log out and log back in. - Confusing the two sides of the 50-pin connectors: refer to the official pinout diagrams (docs.lattepanda.com, images "alphadelta top/bot pinout").
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton.pyPythonservo.pyPythonanalogique.pyPythonrespiration.pyPythonneopixel.pyPython