E Cramer
Published

Man City vs Real Madrid Live Free Champions League 2026

Man City vs Real Madrid Live Free Champions League 2026

BeginnerWork in progress51
Man City vs Real Madrid Live Free Champions League 2026

Things used in this project

Hardware components

LED Replacement Lamp, Festoon
LED Replacement Lamp, Festoon
×1

Story

Read more

Schematics

wwq_Lzz9zBcVG3.jpg

Code

Untitled file

C/C++
//Code produced by Alex Wulff: http://www.AlexWulff.com 
#define BUZZ         0 
#define LED          1 
#define BEEP_DELAY   30
#define LIGHT_DELAY  200
#define INITIAL   5000 //Value is in milliseconds.
//10,000 ms yields a total sequence time of 46.5 Seconds 
//20,000 ms yields a total sequence time of 91.5 Seconds 
//30,000 ms yields a total sequence time of 136.5 Seconds 
//You get the pattern. Each 10 seconds yields another 45 
//seconds of total time on the sequence. 
void setup() { 
 //Initialize the output pins
 pinMode(BUZZ, OUTPUT); 
 pinMode(LED, OUTPUT); 
 //Flash the light to make sure the device is working 
 for (int i = 0; i < 5; i++) { 
   digitalWrite(LED, HIGH); 
   delay(LIGHT_DELAY); 
   digitalWrite(LED, LOW); 
   delay(LIGHT_DELAY); 
 } 
} 
void loop() {
//Iterate 50 times, decreasing the loop delay by a factor of 1/i each time
 for (int i = 1; i < 50; i++) { 
   digitalWrite(BUZZ, HIGH); 
   digitalWrite(LED, HIGH); 
   delay(BEEP_DELAY); 
   digitalWrite(BUZZ, LOW); 
   digitalWrite(LED, LOW); 
   delay(INITIAL/i); 
 } 

Credits

E Cramer
12 projects • 1 follower

Comments