🛠 Premier script Python sur le Linux embarqué
Objectives
Before touching the pins, get familiar with the PC side of the board. The LattePanda 3 Delta is a standard x86-64 UEFI PC: DFRobot publishes an official guide for installing Ubuntu 22.04 LTS. This tutorial verifies the detected hardware (Celeron N5105 4 cores, Intel AX201 Wi-Fi module) and then writes a first Python script that displays system information. The lscpu/lspci method used here is the standard diagnostic command under Linux; the expected hardware strings come from the official datasheet.
Hardware
- LattePanda 3 Delta with Ubuntu 22.04 installed (official guide: USB drive created with Rufus, boot menu via F7, BIOS via DEL) or Windows 10/11 with Python
- HDMI display (HDMI 2.0b) or remote access
- USB keyboard/mouse or SSH access
Complete code
First, check the hardware in a terminal:
# Confirmer le SoC Celeron N5105 (4 cœurs/4 threads, jusqu'à 2,9 GHz)
lscpu | grep -E 'Model name|Socket|CPU\(s\):|MHz'
# Attendu : Intel(R) Celeron(R) N5105 @ 2.00GHz, 4 CPUs
# Confirmer le module Wi-Fi 6 / BT 5.2 Intel AX201
lspci -nnk | grep -A3 -i network # attendu : Intel AX201 [8086:2725]
Then the first script, info_systeme.py:
#!/usr/bin/env python3
"""Premier script : présente la LattePanda 3 Delta."""
import platform
import os
import shutil
print("=== Ma LattePanda 3 Delta ===")
print("OS :", platform.system, platform.release)
print("Machine :", platform.machine) # x86_64 : c'est un PC !
print("Processeur:", platform.processor)
memo = os.sysconf("SC_PAGE_SIZE") * os.sysconf("SC_PHYS_PAGES")
print("RAM :", round(memo / 1024**3), "Go (8 Go LPDDR4 attendus)")
usage = shutil.disk_usage("/")
print("Disque / :", round(usage.used / 1024**3), "Go utilisés sur",
round(usage.total / 1024**3), "Go (eMMC 64 Go attendus)")
Run it with python3 info_systeme.py.
Expected verification
platform.machine returns x86_64 (and not aarch64: this is indeed an Intel PC, not a Raspberry Pi). RAM shows ~8 GB, the root disk ~64 GB if Ubuntu is installed on the eMMC. lscpu displays the Celeron N5105 with 4 CPUs.
Common errors
- Platform confusion: many "SBC" tutorials assume ARM/Raspbian; here it is an x86-64 UEFI, so any standard Debian amd64 package installs.
- Booting into the EFI shell instead of Ubuntu: known issue fixed by updating the BIOS to the latest version (official FAQ).
- Very slow boot: weak or missing CR927 RTC battery — documented issue in the FAQ.
- Kernel too old for the AX201: Wi-Fi 6 (AX201) requires a recent kernel; Ubuntu 22.04 is suitable, an old 2018 distro is not.
pythonnot found under Ubuntu 22.04: usepython3(or installpython-is-python3).
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton.pyPythonservo.pyPythonanalogique.pyPythonrespiration.pyPythonneopixel.pyPython