first commit

This commit is contained in:
Jérôme Delacotte
2025-03-06 11:15:32 +01:00
commit 7b30d6e298
5276 changed files with 2108927 additions and 0 deletions

27
PWM_TEST/PWM_TEST.ino Normal file
View File

@@ -0,0 +1,27 @@
/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
*********/
const int ledPin = D2;
void setup() {
pinMode(ledPin,OUTPUT);
}
void loop() {
// increase the LED brightness
for(int dutyCycle = 0; dutyCycle < 255; dutyCycle++){
// changing the LED brightness with PWM
analogWrite(ledPin, dutyCycle);
delay(10);
}
// decrease the LED brightness
for(int dutyCycle = 255; dutyCycle > 0; dutyCycle--){
// changing the LED brightness with PWM
analogWrite(ledPin, dutyCycle);
delay(10);
}
}