I am getting a temperature reading from my Arduino. The arduino also control 2 switches and goes through thermal cycles. What I want to do is record the temperature for every cycles. The computer need to know what "state" the arduino is in, i.e., when the cycle ends so it can generate a new graphic and store the old data. What I was thinking doing is to print in the serial an array like that: [temperature, state] The thing is that I don't really find it elegant. I'd like to know if there would be a trigger coming from the arduino that would, e.g., break a while (printing data on graphic) and produce a new one.
while True: {
produce new graph
while arduinoTrigger==false:{
plot data
}
}