I just want to use the DHT11 sensor. I know that RIOT has an abstraction layer for sensors, which is really nice. My problem is just: How to use it? I have a server on my device which accepts UDP packets. The server should read the sensor data on a regular base, caches them and sends them back when asked. So, simple as that. Probably I have add the modules for my driver and saul, right? So my Makefile should look like this
USEMDOULE += saul
USEMODULE += dht
The dht driver already has confgurations, which I need to override, since the pins are not correct. Should I just do the following in my application?
#undef DHT_PARAM_PIN
#define DHT_PARAM_PIN (GPIO_PIN(0, 12))
or should I define the DHT_PARAMS? When the setup is done, I probably just need to use saul itself with:
I created a similar simple data collection app [1]. It uses SAUL with an MCP9808 temp sensor (JC 42.4 compliant), and of course CoAP. Start with the README. Then look for ‘saul’ in Makefile and in main.c main() and _run_sensor_loop().
Thanks, works fine. I changed the PIN config in the driver. I am not really happy with it. So, where to place the pin config instead? Should I place it in my boards configuration?
Dear All, i tried to get temperature and humid from DHT11. I tried the information to have a makefile and to use saul for dht. However using physical phy variable i could only gather temperature. Dht also measures humidity. Do you know how to get more than one measurement if the sensor has multi purpose capabilities?