Pierre Dugal
Published

Man City vs Real Madrid Live Free Champions League

Man City vs Real Madrid Live Free Champions League

BeginnerWork in progress4
Man City vs Real Madrid Live Free Champions League

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1

Story

Read more

Schematics

wwq_enlHgMyZ08.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

Pierre Dugal
2 projects • 0 followers

Comments