Guides Arduino project development with circuit design, sensor wiring, sketch structure, and serial communication patterns. Activates on Arduino, sensor, servo, GPIO, or serial communication queries.
Ships in claude-skills-collection. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identifier avant tout :
Critères de sélection de carte :
| Besoin | Carte recommandée |
|---|---|
| Prototype simple, 5V | Arduino Uno / Nano |
| Nombreuses broches | Arduino Mega 2560 |
| WiFi intégré | ESP8266 (NodeMCU) / ESP32 |
| Faible conso batterie | Arduino Pro Mini 3.3V / ESP32 deep sleep |
| BLE + WiFi | ESP32 DevKit |
Avant de câbler :
Règle des broches :
Analog → A0–A5 (lecture ADC 10 bits, 0–1023)
PWM → 3, 5, 6, 9, 10, 11 (Uno) — marque ~ sur la carte
I2C → A4 (SDA), A5 (SCL)
SPI → 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK)
UART → 0 (RX), 1 (TX) — éviter pendant l'upload
Capacité de découplage : 100nF céramique sur VCC/GND de chaque CI sensible (capteur I2C, module RF).
Template minimal opérationnel :
#include <Wire.h> // I2C
// #include <SPI.h> // SPI
// #include <SoftwareSerial.h>
// --- Constantes ---
const uint8_t PIN_LED = 13;
const uint8_t PIN_BTN = 2; // interrupt-capable sur Uno
const unsigned long INTERVAL_MS = 1000;
// --- Variables globales (volatile si ISR) ---
volatile bool eventFlag = false;
unsigned long lastMillis = 0;
// --- ISR ---
void onButton() {
eventFlag = true;
}
void setup() {
Serial.begin(115200);
pinMode(PIN_LED, OUTPUT);
pinMode(PIN_BTN, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(PIN_BTN), onButton, FALLING);
Wire.begin();
}
void loop() {
unsigned long now = millis();
// Tâche périodique non-bloquante (jamais de delay() en prod)
if (now - lastMillis >= INTERVAL_MS) {
lastMillis = now;
readSensors();
publishData();
}
// Traitement événement ISR
if (eventFlag) {
eventFlag = false;
handleButton();
}
}
Règle : ne jamais bloquer loop() — remplacer delay(x) par le pattern millis().
#include <DHT.h>
DHT dht(4, DHT22);
// setup: dht.begin();
float t = dht.readTemperature();
float h = dht.readHumidity();
if (isnan(t) || isnan(h)) { Serial.println("DHT error"); return; }
long getDistance(uint8_t trig, uint8_t echo) {
digitalWrite(trig, LOW); delayMicroseconds(2);
digitalWrite(trig, HIGH); delayMicroseconds(10);
digitalWrite(trig, LOW);
long dur = pulseIn(echo, HIGH, 30000UL); // timeout 30ms
return dur * 0.034 / 2; // cm
}
#include <Servo.h>
Servo srv;
// setup: srv.attach(9);
srv.write(90); // 0–180°
for (uint8_t addr = 1; addr < 127; addr++) {
Wire.beginTransmission(addr);
if (Wire.endTransmission() == 0)
Serial.println(addr, HEX);
}
Serial.begin(115200);
Serial.print("T="); Serial.print(t); Serial.print("°C H="); Serial.println(h);
Moniteur série : menu Outils > Moniteur série, baud rate identique au sketch.
Plotter série : Outils > Traceur série — affiche les valeurs numériques en graphe temps réel.
Macro de debug conditionnel (0 overhead en production) :
#define DEBUG 1
#if DEBUG
#define DBG(x) Serial.println(x)
#else
#define DBG(x)
#endif
Arduino Uno : 2 Ko SRAM, 32 Ko Flash.
// Stocker les strings en Flash, pas en SRAM
Serial.println(F("Démarrage OK"));
// Vérifier la SRAM libre
int freeRam() {
extern int __heap_start, *__brkval;
int v;
return (int)&v - (__brkval == 0 ? (int)&__heap_start : (int)__brkval);
}
Si freeRam() < 100 : risque de crash — passer sur Mega ou ESP32.
#include <avr/sleep.h>
// Mettre l'Uno en sleep entre lectures
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sleep_cpu(); // réveil par interrupt
// ESP32 deep sleep (µA)
esp_sleep_enable_timer_wakeup(30e6); // 30s
esp_deep_sleep_start();
Consommation indicative :
| Piège | Correction |
|---|---|
delay() dans loop() | Pattern millis() non-bloquant |
Variables ISR non volatile | Toujours déclarer volatile |
| Courant LED sans résistance | Calcul R obligatoire (→ brûle la broche) |
| ESP32 I/O à 5V direct | Diviseur résistif ou level shifter 3.3V |
String dynamique sur Uno | Utiliser char[] + snprintf() — String fragmente la SRAM |
Lire analogRead() sans stabilisation | Faire un premier analogRead() factice après changement de pin |
| Upload bloqué par Serial sur pins 0/1 | Utiliser SoftwareSerial sur d'autres pins |
| Lib manquante = erreur cryptique | Gestionnaire de bibliothèques : Ctrl+Shift+I |
.gitignore : build/, .pio/).ArduinoOTA dès le départ pour les mises à jour sans fil.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/claude-skills-collection:iot-arduino-project-guidefrom claude-skills-collection
npx claudepluginhub vantaflow/claude-skills-collection --plugin claude-skills-collection348 skills in this plugin
/agent-a2a-protocol-guideGuide du protocole Agent-to-Agent (A2A) de Google pour l'interopérabilité entre agents IA — découverte, communication et collaboration inter-agents, avec exemples de code, critères de décision et pièges à éviter. Se déclenche avec "A2A", "agent-to-agent", "protocole A2A", "Google A2A", "interopérabilité agents". Also triggers on "agent-to-agent protocol", "agent interoperability", "connect two agents"./agent-agent-observabilityInstrumentation technique d'un agent IA — tracing distribué des appels LLM et outils, spans, métriques custom, corrélation de logs et dashboards de supervision. Pour les alertes et garde-fous de production, voir agent-monitoring-setup. Se déclenche avec "observabilité agent", "tracing agent", "LangSmith", "Langfuse", "OpenTelemetry agent", "spans LLM", "corréler les logs agent". Also triggers on "trace my agent", "LLM tracing", "agent spans"./agent-api-caller-subagentSous-agent spécialisé dans les appels API REST/GraphQL avec retry, auth et transformation de données. Se déclenche avec "sous-agent API", "API caller agent", "agent qui appelle une API", "REST agent", "HTTP agent", "API integration subagent", "external API agent". Also triggers on "subagent that calls an API", "API calling agent", "agent HTTP requests".Other plugins' skills for the same job