-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Faster temperature sampling and moving average
There is a large noise in the temperature readings. That makes the projected temperatures unreliable. Here we add a moving average of 100 samples on top of the temperature readings. The value of 100 was found by looking at the data from previous runs. The temperature readings are done every 10 ms. Assuming the noise is high-frequency, this should produce smooth temperature readings. The added latency is no more than 1 second, which is negligible. The heatings controls are updated every 2 seconds. The logic is not changed. We add an element to the serial output to log which heater has been chosen.
- Loading branch information
Showing
2 changed files
with
104 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters