This project demonstrates how to use the Si70xx temperature sensor to measure and record temperature values and how to use the Segment LCD to display those values.
v4.4.3
Connect the board via a micro-USB or USB-C cable to your PC to flash the example.
You can either create a project based on an example project or start with an empty example project.
-
From the Launcher Home, add the BRD2600A, BRD2504A or BRD2506A to My Products, click on it, and click on the EXAMPLE PROJECTS & DEMOS tab. Find the example project with the filter "temperature".
-
Click Create button on the Platform - Segment LCD and Temperature Sensor example. Example project creation dialog pops up -> click Create and Finish and Project should be generated.
- Build and flash this example to the board.
-
Create an Empty C Project project for your hardware using Simplicity Studio 5.
-
Copy the attached src/app.c file into your project (overwriting existing).
-
Open the .slcp file. Select the SOFTWARE COMPONENTS tab and install the software components:
- [Platform] → [Board Drivers] → [Segment LCD]
- [Platform] → [Board Drivers] → [Si70xx - Temperature/Humidity Sensor]
- [Services] → [Timers] → [Sleep Timer]
-
Build and flash the project to your device.
Note:
-
If the user using brd2506a the SL_BOARD_ENABLE_SENSOR_RHT macro should be enabled by the step below: [Platform] → [Board] → [Starter Kit] → [Board Control] → turn on "Enable Relative Humidity and Temperature sensor"
-
Make sure that this repository is added to Preferences > Simplicity Studio > External Repos.
The project uses a periodic sleeptimer that executes a callback function every 5 seconds. This callback function calls APIs from the Si70xx driver library to measure and read the temperature and relative humidity values from the sensor. These values are then displayed on the segment LCD using APIs from the Segment LCD driver library.
Although measures have been taken to isolate the temperature sensor from the board, temperature measurement results will be affected by on-board power dissipation. More accurate temperature measurements are obtained when powering the board with a battery or through the Mini Simplicity connector and on-board debugger in a low power state.