golioth / zephyr-training

Code for Golioth's Zephyr Training using the Nordic nRF7002-DK
Apache License 2.0
20 stars 12 forks source link

add temperature data to LightDB Stream #1

Closed szczys closed 1 year ago

szczys commented 1 year ago

This commit implements simulated temperature data. New readings are generated once per second using random values that are restricted to a small delta. The get_temperature(struct sensor_valeue *) function may be called as often as needed to retrieve the most recent reading.