Skip to main content Microfire 

SHT3x for Arduino



📦 Arduino

Library available in Arduino IDE and PlatformIO

PDF DOC HTML

📒 Datasheet

Datasheet

PDF


1.

🔽 Install Arduino IDE

Install the Arduino IDE

2.

📦 Install the library

Start the Arduino IDE, press the Sketch menu, and then Include Library > Manage Libraries. Search for Microfire_SHT3x and install the library.

There are also lots of other SHT3x libraries, any of them will work if you prefer.

3.

🔌 Connections

Module
Controller
GND ground
VCC 3.3 - 5 volt power supply
SCL SCL
SDA SDA


4.

🔢 Code

Below is the Basic example. It can be found in File > Examples > Microfire_SHT3x > Basic in the Arduino IDE.
1
#include "Microfire_SHT3x.h"
2
Microfire::SHT3x sht30;
3

4
void setup() {
5
  Serial.begin(9600);
6
  Wire.begin();
7
  sht30.begin();
8
}
9

10
void loop() {
11
  sht30.measure();
12
  Serial.println((String)sht30.tempC + " °C");
13
  delay(1000);
14
}


5.

➡️ Upload the code

Pick the board and port, then Upload the code.


6.

🔎 View the output

Open the Serial Monitor, measurements should be displayed in the monitor, with updates every second.



Related items