Created
November 14, 2017 00:17
-
-
Save sabas1080/6d03a0966cc980f7cf51817f7c60eb39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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