Kurze Problemstellung :
Ich habe hier ein Arduino Mega Board und möchte mit einem Taster,dass
mein Programm 1x ausgeführt wird !
Mein Problem ist nur, dass der Sketch einfach nicht auf den Tastendruck
ausgeführt wird ?
Hier mal der Sketch, kann mir einer sagen wo der Fehler hängt ?
Gruß
Tim
####################
#include "OneButton.h"
const int vanillesirup=47;
const int Wodka=30;
const int Mangosaft=13; // ist als Wasser deklariert
const int Maracujasaft=48;
const int taster=2;
int ledState = LOW;
void setup() {
pinMode(vanillesirup, OUTPUT);
pinMode(Wodka, OUTPUT);
pinMode(Mangosaft, OUTPUT);
pinMode(Maracujasaft, OUTPUT);
pinMode(taster, INPUT);
}
boolean executed=false;
void loop() {
if (executed==false){
executed=true;
if (digitalRead(taster) == HIGH) {
}
digitalWrite(vanillesirup, HIGH); // turn the on (HIGH is the
voltage level)
delay (500); // vanillesirup 2 CL 1 sec.
digitalWrite(vanillesirup, LOW);
digitalWrite(Wodka, HIGH); // turn the on (HIGH is the voltage
level)
delay (500); // Wodka 2 CL 1 sec.
digitalWrite(Wodka, LOW);
digitalWrite(Mangosaft, HIGH); // turn the on (HIGH is the
voltage level)
delay (1000); // 2CL 1 sec.
digitalWrite(Mangosaft, LOW);
digitalWrite(Maracujasaft, HIGH); // turn the on (HIGH is the
voltage level)
delay (1000); // 2CL 1 sec.
digitalWrite(Maracujasaft, LOW);
delay(5);
}
else
{
digitalWrite(vanillesirup,LOW);
digitalWrite(Wodka,LOW);
digitalWrite(Mangosaft,LOW);
{
}
}
}
#####################################