Hallo,
ich bin ein blutiger Arduino Anfänger und komme mit einer Frage die Ihr Experten sicherlich sofort lösen könnt. Zur Zeit bin ich in Fidschi und dort ist die elektrische Steuerung meiner Waschmaschine kaputt gegangen. Ersatzteile bekomme ich nicht und deshalb will ich das Ganze auf Arduino umbauen.
Das Programm soll die Drehrichtung des Motors alle 10 Sekunden ändern; dazwischen ist eine Pause von 2 Sekunden.
/*
Wash
Switch the turn direction of a washing maschine.
The motor moves 10 seconds leftway
wait for 2 seconds
The motor moves 10 seconds rightway
wait for 2 seconds
*/
// define the pins
// give it a name:
int links = 11;
int rechts = 10;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(links, OUTPUT);
pinMode(rechts, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(links, HIGH); // turn the motor left way (HIGH is the voltage level)
delay(10000); // wait for a 10 seconds
digitalWrite(links, LOW); // turn the motor off by making the voltage LOW
delay(2000); // wait for a 2 seconds
digitalWrite(rechts, HIGH); // turn the rightway (HIGH is the voltage level)
delay(10000); // wait for 10 seconds
digitalWrite(rechts, LOW); // turn the motor off by making the voltage LOW
delay(2000); // wait for a 2 seconds
}
Ich denke das funktioniert wenn ich 2 Relais ansteuere. Nun meine Frage: wie kann ich das Programm nach 10 Minuten beenden?
Wer wei was?
Vielen Dank schon mal im voraus
[EDIT] CODE Tags hinzugefügt Grüße Uwe[/EDIT]