

The XKC-Y26-V is a digital temperature and humidity sensor designed for accurate environmental monitoring. Its compact design and dual communication interfaces (I2C and UART) make it versatile and easy to integrate into a wide range of applications. The sensor is ideal for IoT devices, smart home systems, weather stations, and industrial automation projects. With its reliable performance and low power consumption, the XKC-Y26-V is a popular choice for both hobbyists and professionals.








The XKC-Y26-V sensor has 4 pins, as described in the table below:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V) |
| 2 | GND | Ground |
| 3 | SDA/Tx | I2C data line / UART transmit line |
| 4 | SCL/Rx | I2C clock line / UART receive line |
0x40 for I2C).Below is an example of how to use the XKC-Y26-V with an Arduino UNO via I2C:
#include <Wire.h>
// Define the I2C address of the XKC-Y26-V sensor
#define SENSOR_ADDRESS 0x40
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
Serial.println("XKC-Y26-V Sensor Initialization...");
}
void loop() {
Wire.beginTransmission(SENSOR_ADDRESS); // Start communication with the sensor
Wire.write(0x00); // Command to request temperature and humidity data
Wire.endTransmission();
delay(50); // Wait for the sensor to process the request
Wire.requestFrom(SENSOR_ADDRESS, 4); // Request 4 bytes of data
if (Wire.available() == 4) {
uint16_t rawTemp = (Wire.read() << 8) | Wire.read(); // Read temperature
uint16_t rawHumidity = (Wire.read() << 8) | Wire.read(); // Read humidity
float temperature = rawTemp / 100.0; // Convert to Celsius
float humidity = rawHumidity / 100.0; // Convert to percentage
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %");
} else {
Serial.println("Error: No data received from sensor.");
}
delay(1000); // Wait 1 second before the next reading
}
No Data Received:
Inaccurate Readings:
Sensor Not Detected:
Q: Can the XKC-Y26-V operate at 3.3V?
A: Yes, the sensor supports an operating voltage range of 3.3V to 5V.
Q: What is the default I2C address of the XKC-Y26-V?
A: The default I2C address is 0x40.
Q: Can I use the XKC-Y26-V in outdoor environments?
A: While the sensor can operate in a wide temperature and humidity range, it is not waterproof. Use a protective enclosure for outdoor applications.
Q: How often can I read data from the sensor?
A: The sensor can provide readings as frequently as every 1 second, but avoid excessive polling to reduce power consumption.
Q: Does the sensor require calibration?
A: The XKC-Y26-V is factory-calibrated and does not require additional calibration under normal conditions.