Hi all
I’m triying to connect a sht10 hum&temp sensor to my electron/photon.
I hooked the cables:
Red—3,3V
Green–ground
yellow–Clock----D1
Blue—Data—D0
I put a 10K resistor from data(blue) to 3,3v
The code:
// This #include statement was automatically added by the Particle IDE.
#include <SHT1x.h>
#include "math.h"
// Specify data and clock connections and instantiate SHT1x object
#define dataPin D0
#define clockPin D1
SHT1x sht1x(dataPin, clockPin);
void setup()
{
Serial.begin(9600);
delay(10000);
Particle.publish("test","===Starting===");
Serial.println("===Starting===");
}
void loop()
{
float temp_c;
float temp_f;
float humidity;
// Read values from the sensor
temp_c = sht1x.readTemperatureC();
humidity = sht1x.readHumidity();
Serial.println("temp");
Serial.println(temp_c);
Serial.println("hum");
Serial.println(humidity);
Particle.publish("test",temp_c);
Particle.process();
delay(5000);
}
If I connect to putty to follow serial I received a message saying “Serial disconnected”
The console did not give any information
Any body know’s what I’m doing wrong?
Many thank’s
Eduard