Hi I have some problems with the connection between arduino and the sensor SHT 75. I've used this code:
#include <Sensirion.h>
const uint8_t dataPin = 2; //Declaracion patillas arduino
const uint8_t clockPin = 3;
float temperature; //Declaracion variables
float humidity;
float dewpoint;
Sensirion tempSensor = Sensirion(dataPin, clockPin); //Declaracion objeto sensor
void setup()
{
Serial.begin(9600); //Declaracion puerto serie
}
void loop() {
tempSensor.measure(&temperature, &humidity, &dewpoint); //Llamada sensor
Serial.print("Temperature: "); //Escribe texto para acompañar al valor
Serial.print(temperature); //Escribe valor en la misma linea
Serial.print(" C, Humidity: "); //Escribe texto para acompañar al valor
Serial.print(humidity); //Escribe valor en la misma linea
Serial.print(" %, Dewpoint: "); //Escribe texto para acompañar al valor
Serial.print(dewpoint); // Escribe valor en la misma linea
Serial.println(" C");
delay(5000); //Tiempo de espera para la siguiente ejecucion
}
But which is the problem? the problem is that when I go to the monitor serie in order to see the measures I just get this:
temperature: 0.0 humidity: 0.0 % dewpoint: 0.0
temperature: 0.0 humidity: 0.0 % dewpoint: 0.0
temperature: 0.0 humidity: 0.0 % dewpoint: 0.0
...
So I don't know what is the problem may be the connections, the code, it could be that I can't connect directly 5V from arduino with sensor SHT 75 because it needs just 3.5 V ??
Some idea ? Any aid will be welcome.
Thanks a lot.
#include <Sensirion.h>
const uint8_t dataPin = 2; //Declaracion patillas arduino
const uint8_t clockPin = 3;
float temperature; //Declaracion variables
float humidity;
float dewpoint;
Sensirion tempSensor = Sensirion(dataPin, clockPin); //Declaracion objeto sensor
void setup()
{
Serial.begin(9600); //Declaracion puerto serie
}
void loop() {
tempSensor.measure(&temperature, &humidity, &dewpoint); //Llamada sensor
Serial.print("Temperature: "); //Escribe texto para acompañar al valor
Serial.print(temperature); //Escribe valor en la misma linea
Serial.print(" C, Humidity: "); //Escribe texto para acompañar al valor
Serial.print(humidity); //Escribe valor en la misma linea
Serial.print(" %, Dewpoint: "); //Escribe texto para acompañar al valor
Serial.print(dewpoint); // Escribe valor en la misma linea
Serial.println(" C");
delay(5000); //Tiempo de espera para la siguiente ejecucion
}
But which is the problem? the problem is that when I go to the monitor serie in order to see the measures I just get this:
temperature: 0.0 humidity: 0.0 % dewpoint: 0.0
temperature: 0.0 humidity: 0.0 % dewpoint: 0.0
temperature: 0.0 humidity: 0.0 % dewpoint: 0.0
...
So I don't know what is the problem may be the connections, the code, it could be that I can't connect directly 5V from arduino with sensor SHT 75 because it needs just 3.5 V ??
Some idea ? Any aid will be welcome.
Thanks a lot.