xerbot 0.2 : les broches pilotées depuis le labo (xb.broches, pin.mode / pin.ecrire / pins → state.pins, entrées relues 250 ms) ; exemple 07 ; test 12/12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R75H65SynGwRG5vBSoYeZ1
This commit is contained in:
cloudion
2026-11-04 20:57:28 +00:00
parent a361215dcf
commit d63a4bd79e
6 changed files with 97 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
// 07-broches : chaque broche se reconfigure DEPUIS LE LABO (contribuer › ⬢ xeroction, ou xerbot) — entrée, pull-up, sortie, PWM, ADC.
// Seules les broches listées ici sont pilotables (ne pas nuire : jamais une broche de flash, d'USB ou de boot de ta carte).
#include <Xerbot.h>
Xerbot xb("banc-1", "banc");
// ESP32 DevKit : des broches sans risque. Uno : {2, 3, 4, 5, 6, A0}.
static const uint8_t BROCHES[] = {2, 4, 5, 18, 19, 21, 22, 23, 25, 26, 32, 33, 34, 35};
void setup() { Serial.begin(115200); xb.broches(BROCHES, sizeof BROCHES); xb.begin(Serial); }
void loop() { xb.loop(); }