apuntes_Arduino/leds/scanner_party_x3/scanner_party_x3.ino
jp.av.dev 85bf8bb429 proyectos renombrados, reestructuracion
pendientes crear, indexar y linkear readmes
2022-04-04 01:11:04 -04:00

62 lines
980 B
C++
Executable File

byte green = 4;
byte blue = 3;
byte red = 2;
int wait = 4000;
void setup() {
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(red,OUTPUT);
}
void secu1(int r) {
while (r>0) {
digitalWrite(green,1);
delay(wait);
digitalWrite(green,0);
digitalWrite(red,1);
delay(wait);
digitalWrite(red,0);
digitalWrite(blue,1);
delay(wait);
digitalWrite(blue,0);
--r;
}
}
void secu2(int r) {
while (r>0){
digitalWrite(blue,0);
digitalWrite(red,1);
delay(wait);
digitalWrite(green,0);
digitalWrite(blue,1);
delay(wait);
digitalWrite(red,0);
digitalWrite(green,1);
delay(wait);
--r;
}
}
/*
void secu3(int r) {
while (r>0) {
for (int x=
}
}*/
void loop() {
/*secu1(4);
secu2(4);*/
digitalWrite(green,0);
digitalWrite(red,1);
delay(wait);
digitalWrite(blue,1);
digitalWrite(red,0);
delay(wait);
digitalWrite(green,1);
digitalWrite(blue,0);
delay(wait);
}