Hello there, hopping to get some help!
I saw @andyt1968 could communicate with the sensot but it seems he has been offline for a while.
I am trying to communicate with the SHT30 using the I2C1. I am using VDD and the sensor is supposed to have pullup resistors.
The sensor library can be found at
I was able to retrieve the sensor address using this code:
#include “Arduino.h”
#include “Wire.h”
#include <SHT3x.h>
void setup()
{
Serial.begin(115200);
Wire1.begin();
delay(5000);
Sensor.Begin();
}
void loop()
{
byte error, address;
int nDevices;
Serial.println(“Scanning…”);
nDevices = 0;
for(address = 1; address < 127; address++ )
{
Wire1.beginTransmission(address);
error = Wire1.endTransmission();
if (error == 0)
{
Serial.print(“I2C device found at address 0x”);
if (address<16)
Serial.print(“0”);
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
else if (error==4)
{
Serial.print(“Unknown error at address 0x”);
if (address<16)
Serial.print(“0”);
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println(“No I2C devices found\n”);
else
Serial.println(“done\n”);
delay(5000);
}
So I supoose wiring is ok…
Now I am tring to get some data from it with no sucess, I am using the code below getting 0 reading for both variables:
#include “Arduino.h”
#include “Wire.h”
#include <SHT3x.h>
SHT3x Sensor;
void setup()
{
Serial.begin(115200);
Sensor.Begin();
Wire1.begin();
delay(3000);
}
void loop()
{
Sensor.UpdateData();
Serial.print(“Temperature: “);
Serial.print(Sensor.GetTemperature());
Serial.write(”\xC2\xB0”); //The Degree symbol
Serial.println(“C”);
Serial.print(“Humidity: “);
Serial.print(Sensor.GetRelHumidity());
Serial.println(”%”);
}
Thanks in advance!