🛠 Faire clignoter une LED sur les broches du coprocesseur

LattePanda Alpha · debutant · Schéma : IMG-lattepanda-alpha-debutant-1-led-mcu.svg — LED et résistance 330 Ω sur la broche D13 du connecteur 50 broches, reliée à la masse

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

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

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials