Last active
December 24, 2015 02:18
-
-
Save ledongthuc/d625b1c4e35889b74a65 to your computer and use it in GitHub Desktop.
This file contains 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
const int ledPin1 = 13; | |
const int ledPin2 = 6; | |
const int tonePin = 8; | |
const int gnd1 = 7; | |
const long interval = 100; | |
int ledState = LOW; | |
void setup() { | |
pinMode(ledPin1, OUTPUT); | |
pinMode(ledPin2, OUTPUT); | |
pinMode(gnd1, OUTPUT); | |
digitalWrite(gnd1, LOW); | |
} | |
void loop() | |
{ | |
setEyesStatus(LOW); | |
delay(interval); | |
setEyesStatus(HIGH); | |
delay(5000); | |
} | |
void setEyesStatus(int state) { | |
digitalWrite(ledPin1, state); | |
digitalWrite(ledPin2, state); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment