added shiny blinky LED

This commit is contained in:
Lucas Pleß 2014-04-12 21:43:39 +02:00
parent ae8d0ea9f5
commit 9be0f3566d
1 changed files with 15 additions and 0 deletions

View File

@ -1,6 +1,9 @@
char zaehler;
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
pinMode(7, OUTPUT);
zaehler = 0;
} }
float getTemperature(void) float getTemperature(void)
@ -55,6 +58,7 @@ float getTemperature(void)
void loop() { void loop() {
zaehler++;
int airFlow = analogRead(A1); int airFlow = analogRead(A1);
int emg = analogRead(0); int emg = analogRead(0);
int temp = getTemperature(); int temp = getTemperature();
@ -64,5 +68,16 @@ void loop() {
Serial.print(";"); Serial.print(";");
Serial.println(temp); Serial.println(temp);
delay(100); delay(100);
if(zaehler >= 10) {
zaehler = 0;
if(digitalRead(7) == HIGH) {
digitalWrite(7, LOW);
} else {
digitalWrite(7, HIGH);
}
}
} }