The goal of this section is to have our sensor data reflect in our charts. We know that readings are measured every two seconds. This means that we will also have to update our charts every two seconds. This is a slightly different situation when compared to the sample chart we created earlier because there are some assumptions that we didn't consider:
- The constant readings from the sensor require that our chart be dynamic. The values plotted have to change every time a new reading comes.
- We must choose a sensible scale. Our sample chart had values from 12 to 23. In the real world, temperature and humidity readings rarely change that often or that drastically, especially when we are measuring on a per-second timescale.
Fortunately, the Chart.js library has features to take care of both of these new findings. Let's modify our...