Difference between revisions of "XIAO-ESP32S3 Wi-Fi LED Code"
(Created page with "==== ESP32 ==== https://www.raspberryme.com/fonctions-utiles-de-la-bibliotheque-wi-fi-esp32-arduino-ide/") |
(→ESP32) |
||
| Line 2: | Line 2: | ||
https://www.raspberryme.com/fonctions-utiles-de-la-bibliotheque-wi-fi-esp32-arduino-ide/ | https://www.raspberryme.com/fonctions-utiles-de-la-bibliotheque-wi-fi-esp32-arduino-ide/ | ||
| + | |||
| + | <PRE> | ||
| + | #define USER_LED 21 | ||
| + | |||
| + | void setup() { | ||
| + | pinMode(USER_LED, OUTPUT); | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | digitalWrite(USER_LED, LOW); // Allume la LED | ||
| + | delay(1000); // Attendre 1 seconde | ||
| + | digitalWrite(USER_LED, HIGH); // Éteint la LED | ||
| + | delay(1000); // Attendre 1 seconde | ||
| + | } | ||
| + | </PRE> | ||
Revision as of 21:00, 12 September 2025
ESP32
https://www.raspberryme.com/fonctions-utiles-de-la-bibliotheque-wi-fi-esp32-arduino-ide/
#define USER_LED 21
void setup() {
pinMode(USER_LED, OUTPUT);
}
void loop() {
digitalWrite(USER_LED, LOW); // Allume la LED
delay(1000); // Attendre 1 seconde
digitalWrite(USER_LED, HIGH); // Éteint la LED
delay(1000); // Attendre 1 seconde
}