This sample application periodically takes temperature and humidity readings using the renesas_hs300x sensor driver. The result is written to the console. The HS3001 and HS3003 sensors are supported by the same application and driver.
This sample needs a Renesas HS3001 or HS3003 sensor connected to the target board's I2C connector.
This sample has been tested with Nucleo STM32F401RE board. A click shield for NUCLEO-64 was used to connect TEMP&HUM 17 click and TEMP&HUM 18 click boards to the STM32F401RE board.
The sensor operates at 3.3V and uses I2C to communicate with the board.
External Wires:
- Breakout GND pin <--> Nucleo GND pin
- Breakout VCC pin <--> Nucleo 3V3 pin
- Breakout SDA pin <--> Nucleo CN5-D14 pin
- Breakout SCL pin <--> Nucleo CN5-D15 pin
In order to build the sample, connect the board to the computer with a USB cable and enter the following commands:
The output can be seen via a terminal emulator (e.g. minicom). Connect the board with a USB cable to the computer and open /dev/ttyACM0 with the below serial settings:
- Baudrate: 115200
- Parity: None
- Data: 8
- Stop bits: 1
The output should look like this:
Device HS300x - 0x200010a8 is ready
temp is 26.70 oC
hum is 50.71 %RH
...