From 565f804feabcf0409c954242b9aabc30ab713b3b Mon Sep 17 00:00:00 2001 From: Johannes Winkelmann Date: Tue, 29 Jun 2021 07:46:18 -0700 Subject: [PATCH] Add support for SHTC3 --- README.md | 1 + SHTSensor.cpp | 1 + SHTSensor.h | 3 ++- library.properties | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a29481..5a6099e 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Repository for Sensirion humidity and temperature sensor support on Arduino ## Supported sensors: - SHTC1 +- SHTC3 - SHTW1 - SHTW2 - SHT3x-DIS (I2C) diff --git a/SHTSensor.cpp b/SHTSensor.cpp index 5125e0f..2ea2d32 100644 --- a/SHTSensor.cpp +++ b/SHTSensor.cpp @@ -300,6 +300,7 @@ bool SHTSensor::init() case SHTW1: case SHTW2: case SHTC1: + case SHTC3: mSensor = new SHTC1Sensor(); break; case SHT4X: diff --git a/SHTSensor.h b/SHTSensor.h index 53d9bab..212721f 100644 --- a/SHTSensor.h +++ b/SHTSensor.h @@ -55,6 +55,7 @@ class SHTSensor /** SHT3x-DIS with ADDR (sensor pin 2) connected to VDD */ SHT3X_ALT, SHTC1, + SHTC3, SHTW1, SHTW2, SHT4X @@ -79,7 +80,7 @@ class SHTSensor static const float TEMPERATURE_INVALID; /** * Auto-detectable sensor types. - * Note that the SHTW1 and SHTW2 share exactly the same driver as the SHTC1 + * Note that the SHTC3, SHTW1 and SHTW2 share exactly the same driver as the SHTC1 * and are thus not listed individually. */ static const SHTSensorType AUTO_DETECT_SENSORS[]; diff --git a/library.properties b/library.properties index a6c2469..2b5783a 100644 --- a/library.properties +++ b/library.properties @@ -3,7 +3,7 @@ version=1.1.0 author=Johannes Winkelmann, Andreas Brauchli maintainer=Johannes Winkelmann sentence=Support for Sensirion's humidity and temperature sensors. -paragraph=Supported sensors: SHTC1, SHTW1, SHTW2, SHT3x-DIS (I2C), SHT3x-ARP. +paragraph=Supported sensors: SHTC1, SHTC3, SHTW1, SHTW2, SHT3x-DIS (I2C), SHT3x-ARP, SHT4x category=Sensors url=https://developer.sensirion.com architectures=*