Commit graph

8 commits

Author SHA1 Message Date
rbaron
8fd4d7222a Implements BLE protocol v2
The only change from v1 is how the temperature is encoded. In v2, two
bytes at offset 4 and 5  represent a 16-bit signed int (in big-endian).
It contains the temperature in degrees Celsius *  100.

Fixes #29
2022-03-14 18:23:49 +01:00
rbaron
d2daefaf46 Updates ambient brightness estimation code
Also renames the `lux` field from `photo_read_t` to the more generic `brightness`.
2021-09-22 22:38:30 +02:00
rbaron
e32803d44d Improvements to photo resistor-based lux estimation
- Code now compiles
- Estimation of the photo resistor resistance works
- Lux estimation from the photo resistor resistance needs more work and calibration
- Lux is now encoded in the BLE advertisement payload
2021-09-22 22:38:30 +02:00
rbaron
e54449bf84 Adds make lint and make lint-fix 2021-04-10 18:19:37 +02:00
rbaron
3c7180fefa Adds run_counter to ble advertising packet 2021-03-28 10:44:33 +02:00
rbaron
c2e3723eb0 Adds temp and humidity values to the BLE advertisement packet 2021-03-26 10:49:28 +01:00
rbaron
25772def7e ADC works for measuring the battery voltage 2021-03-17 19:08:17 +01:00
rbaron
20243a26a2 Extracted BLE to src/prst/ble.{c,h} 2021-03-14 11:06:45 +01:00