EasyManua.ls Logo

Keyestudio ESP32 - 4. Test Result

Keyestudio ESP32
344 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ESP32 Starter Kit
(continued from previous page)
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
//Three quickly blinks mean “S”
for(int x=0;x<3;x++){
digitalWrite(ledPin,HIGH); //Set LED to light up
delay(150); //Delay 150ms
digitalWrite(ledPin,LOW); //Set LED to turn off
delay(100); //Delay 100ms
}
//delay 200ms to generate the space between letters
delay(200);
//Three slowly blinks mean “O”
for(int x=0;x<3;x++){
digitalWrite(ledPin,HIGH); //Set LED to light up
delay(400); //Delay 400ms
digitalWrite(ledPin,LOW); //Set LED to turn off
delay(200); //Delay 200ms
}
//Delay 100ms to generate the space between letters
delay(100);
// Three quickly blinks mean “S”
for(int x=0;x<3;x++){
digitalWrite(ledPin,HIGH); //Set LED to light up
delay(150); //Delay 150ms
digitalWrite(ledPin,LOW); //Set LED to turn off
delay(100); //Delay 100ms
}
// Wait 5s before repeating S.0.S
delay(5000);
}
4. Test Result
After the code is successfully uploaded, we can see that the LED flashes 3 times quickly, then slowly flashes 3 times
and then flashes 3 times quickly, then flash again 5s later.
52 Chapter 8. Arduino Tutorial

Table of Contents