Skip to content

drivers/sensors: Add SHTC3 temperature and humidity sensor - #18880

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
Shriyans406:shtc3-driver
Oct 26, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
Shriyans406:shtc3-driver

Conversation

@Shriyans406

@Shriyans406 Shriyans406 commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a uORB lower-half I2C driver for the Sensirion SHTC3 temperature and
humidity sensor.

  • drivers/sensors/shtc3_uorb.c and include/nuttx/sensors/shtc3.h
  • CONFIG_SENSORS_SHTC3 Kconfig plus Make.defs / CMakeLists.txt integration
  • Documentation under Documentation/os/drivers/special/sensors/

Impact

New optional sensor driver. No impact unless CONFIG_SENSORS_SHTC3 is enabled.

Testing

  • checkpatch.sh (commit message, codespell and nxstyle) passes in CI.
  • Not yet validated on physical SHTC3 hardware. I will update this PR once I
    have access to the sensor at college.

@linguini1 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! However, writing a driver without being able to test it is unfortunately not of very much use. I would suggest you only submit code which you are able to test, unless there is an open issue where someone with the hardware is requesting a feature and can test it.

Please read the contributing guide and make sure your PR meets all those requirements.

This driver doesn't use the sensor framework. You can read about it in the documentation.

@github-actions github-actions Bot added Area: Sensors Sensors issues Size: M The size of the change in this PR is medium labels May 14, 2026
@Shriyans406
Shriyans406 requested a review from Donny9 as a code owner May 14, 2026 21:10
@Shriyans406

Shriyans406 commented May 14, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Shriyans406

Copy link
Copy Markdown
Contributor Author

I have made changes, please give it a look.

Regards

@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation and removed Area: Sensors Sensors issues labels May 14, 2026
@linguini1

Copy link
Copy Markdown
Contributor

I am a student trying to make my first contributions to open-source RTOS development.

Awesome! Hope you're enjoying NuttX so far.

We'll wait to merge this PR until you're able to test at college. Also, your PR still does not follow the template: summary, impact, testing. Take a look at another merged PR for an example :)

jerpelea
jerpelea previously approved these changes May 18, 2026
@xiaoxiang781216
xiaoxiang781216 requested a review from linguini1 May 20, 2026 01:37
jerpelea
jerpelea previously approved these changes May 20, 2026
acassis
acassis previously approved these changes May 20, 2026
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

Comment thread drivers/sensors/shtc3_uorb.c Resolved
Comment thread include/nuttx/sensors/shtc3.h Resolved
@Shriyans406 Shriyans406 changed the title drivers/sensors: Add SHTC3 temperature and humidity sensor. The drive… drivers/sensors: Add SHTC3 temperature and humidity sensor Oct 24, 2026
@Shriyans406

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current master (now a single signed-off commit) and fixed the two checkpatch errors (Missing blank line after declarations) in shtc3_uorb.c. CI is re-running.

The driver still needs validation on physical SHTC3 hardware; I will update once that is done.

This adds uORB driver support for the Sensirion SHTC3 I2C sensor, exposing ambient temperature and relative humidity nodes.

Signed-off-by: Shriyans S Sahoo <[email protected]>
@xiaoxiang781216
xiaoxiang781216 merged commit d9f27b9 into apache:master Oct 26, 2026
53 checks passed
@linguini1

Copy link
Copy Markdown
Contributor

@xiaoxiang781216 my review comment was not fixed; this PR still doesn't have testing of the driver.

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@xiaoxiang781216 my review comment was not fixed; this PR still doesn't have testing of the driver.

it's simple driver, and disable by default, anyone can test if they are interesting.

@linguini1

Copy link
Copy Markdown
Contributor

That is not what we ask in the contribution guide and it's not the standard we should use for merging. If something is in the kernel, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants