Skip to content

Instantly share code, notes, and snippets.

@sabas1080
Created November 14, 2017 00:17
Show Gist options
  • Save sabas1080/6d03a0966cc980f7cf51817f7c60eb39 to your computer and use it in GitHub Desktop.
Save sabas1080/6d03a0966cc980f7cf51817f7c60eb39 to your computer and use it in GitHub Desktop.
int valor = 0;
void setup() {
// put your setup code here, to run once:
pinMode(13,OUTPUT);
pinMode(10,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(10)==1)
{
//valor = parpadear(100, 'a');
}
//Serial.print(a); //Error
}
int parpadear(int tiempo, char hola){
int a=0; //
digitalWrite(13, HIGH);
delay(tiempo);
digitalWrite(13,LOW);
delay(tiempo);
Serial.print(hola);
a=2;
a=a+2+3+random(1,9);
return a;
}
void obtenertimpo(int tiempo){
int a=0; //
digitalWrite(13, HIGH);
delay(tiempo);
digitalWrite(13,LOW);
delay(tiempo);
a=2;
a=a+2+3+random(1,9);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment