Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Read temperature and humidity data from shtc3 sensor

1. Introduction

1.1 Shtc3

This guide explains how to create a flow and then use the node Node-RED-contrib-shtc3 to read the data of temperature and humidity from shtc3 sensor. Its pin-map is showed as follows.

image-20220321100549330

1.2 RAK1901

RAK1901 is a WisBlock Sensor that extends the WisBlock system with a temperature and humidity sensor.

image-20220511163827917

2. Preparation

2.1. Hardware

There are two ways to use shtc3 sensor in this example:

  • Raspberry Pi 4B + RAK6421 WisBlock Hat + RAK1901

image-20220511164853835

  • Raspberry Pi CM4 + RAK7391 WisGate Developer Connect

    Since the shtc3 sensor is already in RAK7391 board, we no need use another shtc3 sensor.

image-20220511164240817

2.2. Software

Please install node-red-contrib-shtc3 node with the following commands. If you use docker of Node-RED, you may need to replace ~/.node-red with /usr/src/node-red.

git clone https://github.com/RAKWireless/node-red-nodes.git
cp -rf node-red-nodes/node-red-contrib-shtc3 ~/.node-red/node_modules
cd ~/.node-red/node_modules/node-red-contrib-shtc3 && npm install

3. Run example

Import the shtc3-read.json file into your new flow. Then, the new flow should look like this:

image-20220321102231319

Hit the Deploy button on the top right to deploy the flow.

This is a simple flow with three node, where inject node supply a trigger event every 5 seconds, shtc3_i2cnode read data of shtc3, and debug node print the temperature and humidity read from shtc3 sensor.

The result is as follows:

image-20220321103758128

4. License

This project is licensed under MIT license.