https://forum.arduino.cc/t/problems-wit ... sor/513169
/****************************************************************
* ReadSHT2x
* An example sketch that reads the sensor and prints the
* relative humidity to the PC's serial port
*
* Tested with:
* - SHT21-Breakout Humidity sensor from Modern Device
* - SHT2x-Breakout Humidity sensor from MisensO Electronics
***************************************************************/
#include <Wire.h>
#include <Sodaq_SHT2x.h>
void setup()
{
Wire.begin();
Serial.begin(115200);
}
void loop()
{
Serial.print("Humidity(%RH): ");
Serial.print(SHT2x.GetHumidity());
Serial.print(" Temperature(C): ");
Serial.println(SHT2x.GetTemperature());
Serial.print(" Dewpoint(C): ");
Serial.println(SHT2x.GetDewPoint());
delay(3000);
}
/////////////////////////////////////////
This code is working well in ESP-07s but this code is unable to communicate with SHT21 sensor in case of ES32 where i am using i2c protocal.
How to established I2C communication between ESP32 and SHT21 14bits humidity and temperature programing.
Who is online
Users browsing this forum: No registered users and 80 guests