Skip to content

Sensors Configuration

Rhomb.iot sensors configuration is done in the configuration file. External sensors may require specific wiring.

All the sensors require to be set up by editing the user configuration file conf-user.h.

You have to activate the sensor you want based on the following settings for each component.

SENSOR TYPE NAME
Temperature & Humidity DHT11, DHT22
Temperature, Humidity & Barometer BME280
Touch switch Sunfounder Touch Switch
NFC PN532

DHT11

Datasheet

Download

Configuration

file: /src/conf/conf-user.h

#define USE_SENS_TEMP SENSOR_DHT11  // Use DHT11 sensor
#define USE_SENS_HUMI SENSOR_DHT11  // Use DHT11 sensor
#define DHT_PIN MOSI                // Input pin

Wiring

Console output example

[I] 0 SET OPMODE NORMAL
[I] 10 Read humidity
[I] 10 Read temperature
[I] 10 Message created:: 0001|s|time:10$temp:29.0$humi:55.0$
[I] 10 Message size:: 55

BME280

Datasheet

Download

Configuration

// file: /src/conf/conf-user.h
#define USE_SENS_TEMP SENSOR_BME280 // Use BME280 sensor

Wiring

Output Example

[I] 0 SET OPMODE NORMAL
[I] 9 Read humidity
[I] 9 Read temperature
[I] 9 Message created:: 0001|s|time:9$temp:28.0$
[I] 9 Message size:: 24

SUNFOUNDER TOUCH SWITCH

Configuration

// file: /src/conf/conf-user.h
#define USE_SENS_TOUCH SENSOR_TOUCH_SF  // Use touch sensor
#define TOUCH_PIN MISO                  // Input pin

Wiring

Output Example

[I] 0 INIT Sensors
[I] 0 SET OPMODE NORMAL
[I] 0 INIT TOUCH SENSOR
[I] 9 Message created:: 0001|s|time:9$touch:0$
[I] 9 Message size:: 22

NFC PN532

Datasheet

Download

Wiring

Output Example

[I] 0 INIT Sensors
[I] 0 SET OPMODE NORMAL
[I] 0 INIT NFC_PN532
[I] 0 NFC_versiondata: 838927879
[I] 6 NFC id: 2073782029
[I] 9 Message created:: 0001|s|time:9$tags:2073782029,$
[I] 9 Message size:: 31

Comments