/*
* Unidades Curriculares Variadas
* Departamento de Engenharia Eletrotécnica (DEE)
* Politécnico de Leiria - Escola Superior de Tecnologia e Gestão (ESTG)
* Example 01 - Blinking a Light Emiting Diode (LED)
*/
#define WOKWI_SIMULATION 1
#define BAUDRATE 115200 // Baudrate is 115200 bits per second (bps)
#define PIN_LED 19 // Pin 19 is attached an LED
#define DELAY_MS 1000 // Delay per loop is 1 second
// put your setup code here, to run once
void setup() {
// Initialize Serial 0
Serial.begin(BAUDRATE);
Serial.println("<from: ESP32-C3> Hello class!");
// Define PIN_LED direction
pinMode(PIN_LED, OUTPUT);
}
// put your main code here, to run repeatedly
void loop() {
// Set pin PIN_LED state to HIGH
digitalWrite(PIN_LED, HIGH);
// Delay DELAY_MS ms
delay(DELAY_MS/2);
// Set pin PIN_LED state to LOW
digitalWrite(PIN_LED, LOW);
// Delay DELAY_MS ms
delay(DELAY_MS/2);
#if WOKWI_SIMULATION
delay(10);
#endif
}
Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1