diff --git a/reflowctl/reflowctl.ino b/reflowctl/reflowctl.ino index 1cf355a..e77c9a4 100644 --- a/reflowctl/reflowctl.ino +++ b/reflowctl/reflowctl.ino @@ -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); diff --git a/serialmon.py b/serialmon.py new file mode 100755 index 0000000..efa7a1e --- /dev/null +++ b/serialmon.py @@ -0,0 +1,6 @@ +#!/usr/bin/python + +import serial +ser = serial.Serial('/dev/ttyUSB0', 9600) +while 1: + print ser.readline()