now with serialmonitor read script
This commit is contained in:
parent
cf064e6a4d
commit
1600c9ff23
|
@ -42,7 +42,7 @@ void setup() {
|
|||
|
||||
void get_temp() {
|
||||
// simulating an +1K/s rampup oven
|
||||
last_temperatur = ++temperatur;
|
||||
last_temperatur = temperatur++;
|
||||
}
|
||||
|
||||
boolean check_rampup_rate() {
|
||||
|
@ -62,8 +62,6 @@ void loop() {
|
|||
Serial.print(" ");
|
||||
Serial.println(last_temperatur);
|
||||
|
||||
|
||||
// wait a second so as not to send massive amounts of data
|
||||
delay(1000);
|
||||
|
||||
switch (state) {
|
||||
|
@ -75,8 +73,10 @@ void loop() {
|
|||
state++;
|
||||
}
|
||||
case PREHEAT_STATE:
|
||||
if (temperatur > Ts_max)
|
||||
if (temperatur > Ts_max) {
|
||||
Serial.println("Changed state to PREHEAT_STATE");
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
case TAL_STATE:
|
||||
break;
|
||||
|
@ -88,6 +88,8 @@ void loop() {
|
|||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
error:
|
||||
state = END_STATE;
|
||||
Serial.println(error_condition);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import serial
|
||||
ser = serial.Serial('/dev/ttyUSB0', 9600)
|
||||
while 1:
|
||||
print ser.readline()
|
Loading…
Reference in New Issue