[−][src]Module app::app_sensor
Poll the temperature sensor every 10 seconds. Transmit the sensor data to the CoAP server after polling. This is the Rust version of https://github.com/lupyuen/stm32bluepill-mynewt-sensor/blob/nrf52/apps/my_sensor_app/OLDsrc/sensor.c
Constants
SENSOR_POLL_TIME | Poll sensor every 30,000 milliseconds (30 seconds) |
TEMP_SENSOR_KEY | Use key (field name) |
TEMP_SENSOR_TYPE | Type of sensor: Raw temperature sensor (integer sensor values 0 to 4095) |
Statics
SENSOR_DEVICE | Sensor to be polled: |
Functions
start_sensor_listener | Ask Mynewt to poll or read the temperature sensor and call |