M10 : consommation par mode, profil de courant en deep sleep. M11 : publish/subscribe, arborescence des topics. M12 : démarche de projet, structure multi-fichiers. Synthèse : carte du parcours. Figure du chenillard (M2) déplacée après son code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.8 KiB
Python
39 lines
1.8 KiB
Python
"""Synthèse de la formation (préfixe m13 : document hors numérotation des modules)."""
|
|
from outils import boite, fleche, toile
|
|
from style import BLEU, GRIS, ORANGE, ROUGE, VERT, Figure
|
|
|
|
|
|
def parcours_formation():
|
|
fig, ax = toile(16, 8.8)
|
|
colonnes = [
|
|
(1.55, "Prise\nen main", GRIS, [("0", "Installation"), ("1", "Microcontrôleur")]),
|
|
(4.775, "Entrées /\nsorties", BLEU, [("2", "GPIO & NeoPixel"), ("3", "PWM & ADC"), ("4", "Série & debug")]),
|
|
(8.0, "Bus\n& temps", ORANGE, [("5", "I2C & SPI"), ("6", "Interruptions")]),
|
|
(11.225, "Connectivité", VERT, [("7", "Wi-Fi"), ("8", "Serveur web"), ("9", "BLE"), ("11", "MQTT")]),
|
|
(14.45, "Autonomie", ROUGE, [("10", "Énergie")]),
|
|
]
|
|
centres = {}
|
|
for x, titre, c, modules in colonnes:
|
|
ax.text(x, 8.2, titre, ha="center", va="center", fontsize=8.5, fontweight="bold", color=c)
|
|
n = len(modules)
|
|
for k, (num, nom) in enumerate(modules):
|
|
y = 6.95 - k * 1.25 - (4 - n) * 0.3
|
|
boite(ax, x, y, 2.75, 1.0, f"M{num}\n{nom}", couleur=c, taille=7.1)
|
|
centres[num] = (x, y)
|
|
for a, b in (("1", "2"), ("4", "5"), ("6", "7"), ("11", "10")):
|
|
(x1, y1), (x2, y2) = centres[a], centres[b]
|
|
fleche(ax, (x1 + 1.375, y1), (x2 - 1.375, y2), couleur=GRIS)
|
|
projet = boite(ax, 8.0, 0.8, 9.6, 1.1, "M12 — Projet final : au moins 3 modules combinés", couleur=BLEU,
|
|
taille=9, gras=True)
|
|
for x, *_ in colonnes:
|
|
cible = (min(max(x, 3.6), 12.4), projet["h"][1])
|
|
fleche(ax, (x, 2.4), cible, couleur=GRIS, pointille=True)
|
|
ax.text(14.45, 4.5, "la LED NeoPixel\nsert de fil rouge\ndans tous\nles modules", ha="center", va="center",
|
|
fontsize=7.3, color=GRIS, style="italic")
|
|
return fig
|
|
|
|
|
|
FIGURES = [
|
|
Figure("m13-parcours-formation", parcours_formation),
|
|
]
|