Getting the temperature ladder to display on the unicorn the way I wanted (part of the fan module) I had an idea. Using older test data I had chosen 65 °C as the threshold to turn the fan on and 55 °C to turn it off. The RPi has a hard/soft threshold of 85°C and 80°C. The way I built the ladder there is no way to tell how far above 65°C the temperature is. My idea was to blink the top step of the ladder if the temperature gets way above the on-threshold. However, to keep from using all the cpu time, I only update the fan display every 2 seconds and also had a 2 second update cycle in the unicorn module. These 2-second cycle rates muffle and blinking introduced.
Second idea is to add a sixth step to the ladder IF the cpu temperature gets above 70 °C.
To coordinate the temperature ladder generated by the fan module, and the FanLib module turning the fan on and off in the auto-mode, both modules need to use the on-threshold and off-threshold. I set up the FanLib to be a standalone module to control the fan, As such the FanLib defines default values for on-threshold and off-threshold.
In module fan, define two threshold constants.
Pass the constants to FanLib as named parameters when an instance is created.
Module uses the two constants to construct the temperature ladder displayed on the unicorn.
Much time getting all the docstrings up to the same lever. Mostly standardizing documentation for arguments and constants.
Disconnecting the USB between the RPi and Arduino stabilizes the RPi.