muwerk mupplet Sensor Library
muwerk applets; mupplets: functional units that support specific hardware or reusable applications for sensors
|
mupplet-sensor temperature and pressure with GDK101 More...
#include <mup_gamma_gdk101.h>
Public Types | |
enum | GDKSampleMode { ULTRA_LOW_POWER = 1 , LOW_POWER = 2 , STANDARD = 3 , HIGH_RESOLUTION = 4 , ULTRA_HIGH_RESOLUTION = 5 } |
Public Member Functions | |
GammaGDK101 (String name, FilterMode filterMode=FilterMode::FAST, uint8_t i2cAddress=0x18) | |
double | getGamma10minavt () |
double | getGamma1minavt () |
mupplet-sensor temperature and pressure with GDK101
The mup_gamma_gdk101 mupplet measures temperature, pressure, and humity using the GDK101 sensor.
This mupplet is a fully asynchronous state-machine with no delay()s, so it never blocks.
messages are prefixed by omu/<hostname>
:
topic | message body | comment |
---|---|---|
<mupplet-name>/sensor/gamma10minavg | gamma radiation 10 min average μSv/h | Float value encoded as string, sent periodically as available |
<mupplet-name>/sensor/gamma1minavg | gamma radiation 1 min average μSv/h | Float value encoded as string, sent periodically as available |
<mupplet-name>/sensor/mode | FAST , MEDIUM , or LONGTERM | Integration time for sensor values, external, additional integration |
Need to be prefixed by <hostname>/
:
topic | message body | comment |
---|---|---|
<mupplet-name>/sensor/gamma10minavg/get | - | Causes current value to be sent. |
<mupplet-name>/sensor/gamma10minavg/get | - | Causes current value to be sent. |
<mupplet-name>/sensor/mode/get | - | Returns filterMode: FAST , MEDIUM , or LONGTERM |
<mupplet-name>/sensor/mode/set | FAST , MEDIUM , or LONGTERM | Set external additional filter values |
For a complete examples see the muwerk/examples
project.
Hardware accuracy modes of GDK101, while the sensor can have different pressure- and temperature oversampling, we use same for both temp and press.
|
inline |
Instantiate an GDK sensor mupplet
name | Name used for pub/sub messages |
filterMode | FAST, MEDIUM or LONGTERM filtering of sensor values |
i2cAddress | Should always be 0x76 or 0x77 for GDK101, depending address config. |
|
inline |
Get gamma radiation 10min avg
|
inline |
Get gamma radiation 1min avg