Skip to content

Latest commit

 

History

History

platform_segmentLCD_tempsensor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Platform - Segment LCD and Temperature Sensor

Type badge Technology badge License badge SDK badge Build badge Flash badge RAM badge

Summary

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.

Gecko SDK Version

v4.4.3

Hardware Required

Connections Required

Connect the board via a micro-USB or USB-C cable to your PC to flash the example.

Setup

You can either create a project based on an example project or start with an empty example project.

Create a project based on an example project

  1. 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".

  2. 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.

board

  1. Build and flash this example to the board.

Start with an "Empty C Project" project

  1. Create an Empty C Project project for your hardware using Simplicity Studio 5.

  2. Copy the attached src/app.c file into your project (overwriting existing).

  3. 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]
  4. 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.

How It Works

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.

Note

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.