xerbot-arduino/examples/07-broches/07-broches.ino

9 lines
597 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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(); }