Added proportional output funtionality by turning the oven (SSR) on for a portion of the time_step determined by the pid loop output. So, if time_step = 1, and the pid loop is calling for .3 heat, the SSR will be on for .3 seconds, and off for .7 seconds. I did this by adding an additional sleep. Previously, the SSR would be on whenever pid > 0.
unary & is used with 32 bits operands. If the operand literal is not
explicitly expressed as 32bits, it can create random casting errors
depending on the Python version and the underlying implementation.
Added an 'emergency stop' feature to stop a run if the temperature
sensor is no longer providing data. If the temperature sensor values
are remaining stable and exactly the same for 20 time cycles
consecutively while the heat is on, the run is reset to prevent damage
to the part or the oven.