The SparkFun Si7021 Breakout is a compact, high-precision sensor module that measures relative humidity and ambient temperature. Utilizing the Si7021 sensor chip, it offers reliable and accurate readings, which are essential for a wide range of environmental monitoring applications. Common uses include weather stations, home automation systems, and HVAC control.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | 3V3 | 3.3V power supply input |
3 | SDA | I2C data line |
4 | SCL | I2C clock line |
To use the SparkFun Si7021 Breakout in a circuit:
GND
pin to the ground of your power supply.3V3
pin to a 3.3V source.SDA
and SCL
pins to the I2C data and clock lines of your microcontroller, respectively.#include <Wire.h>
#include <SparkFun_Si7021_Breakout_Library.h>
Weather sensor;
void setup() {
Serial.begin(9600);
Wire.begin();
if (sensor.begin() == false) {
Serial.println("Sensor not found. Please check wiring.");
while (1);
}
}
void loop() {
Serial.print("Humidity: ");
Serial.print(sensor.getRH());
Serial.print("%\t");
Serial.print("Temperature: ");
Serial.print(sensor.getTemp());
Serial.println("C");
delay(2000); // Wait 2 seconds between readings
}
Q: Can the sensor be used with 5V systems? A: While the sensor operates at 3.3V, level shifters can be used to interface with 5V systems.
Q: How long should I wait between measurements? A: The sensor can provide a reading every 2 seconds, but for power-saving purposes, longer intervals may be preferred.
Q: Is the sensor waterproof? A: No, the SparkFun Si7021 Breakout is not waterproof and should be protected from moisture.
For further assistance, consult the SparkFun Si7021 Breakout datasheet and the community forums for additional support.