|
@@ -40,22 +40,23 @@ void setup() {
|
|
|
void loop() {
|
|
|
|
|
|
while (t < tmax) {
|
|
|
- t=millis();
|
|
|
+ t = millis();
|
|
|
digitalWrite(Magnet, HIGH);
|
|
|
Drehschalter();
|
|
|
sensors.requestTemperatures();
|
|
|
temperature=sensors.getTempCByIndex(0);
|
|
|
- D =map(analogRead(1), 0, 1023, 0, 255);
|
|
|
+ D = map(analogRead(1), 0, 1023, 0, 255);
|
|
|
pwmWrite(PIN_OUTPUT, D);
|
|
|
analogWrite(LED, D);
|
|
|
LCD();
|
|
|
-// S=digitalRead(2);
|
|
|
+// S = digitalRead(2);
|
|
|
// if (S == HIGH) {
|
|
|
// t=tmax;
|
|
|
// }
|
|
|
-// if (temperature > Tmax) {
|
|
|
-// t=tmax;
|
|
|
-// }
|
|
|
+ if (temperature > Tmax) {
|
|
|
+ digitalWrite(Magnet, LOW);
|
|
|
+ t = tmax;
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -100,7 +101,7 @@ void LCD() {
|
|
|
}
|
|
|
|
|
|
void Abbrechen() {
|
|
|
+ digitalWrite(Magnet, LOW);
|
|
|
t = tmax;
|
|
|
- return(t);
|
|
|
}
|
|
|
-
|
|
|
+
|