Sht85 assemblage

during the arduino assembly I used this script which initially gave no problems:

#include <SHTSensor.h>

#include <Wire.h>

#include "SHTSensor.h"

SHTSensor sht;
// To use a specific sensor instead of probing the bus use this command:
// SHTSensor sht(SHTSensor::SHT3X);

void setup() {
// put your setup code here, to run once:

Wire.begin();
Serial.begin(9600);
delay(1000); // let serial console settle

if (sht.init()) {
Serial.println("init(): success\n");
} else {
Serial.println("init(): failed\n");
}
sht.setAccuracy(SHTSensor::SHT_ACCURACY_MEDIUM); // only supported by SHT3x

}

void loop() {
// put your main code here, to run repeatedly:

if (sht.readSample()) {
Serial.println("SHT:\n");
Serial.println(" RH: ");
Serial.println(sht.getHumidity(), 2);
Serial.println("\n");
Serial.println(" T: ");
Serial.println(sht.getTemperature(), 2);
Serial.println("\n");
} else {
Serial.println("Error in readSample()\n");
}

delay(2000);
}

when I connect the sensor using an arduino breadboard (as per the attachment) it gives me an error in the readSample (see file: Senza_titolo)

I don't understand what the problem is

Images from Original Post so we don't have to download them. See this Simple Image Posting Guide

...R

Please don't post pictures of text - they are unreadable. Just copy and paste the text.

And, sorry, but Fritzing diagrams are too easy to misunderstand. Please make a simple pencil drawing showing all the connections and post a photo of the drawing.

You say that the program " initially gave no problems: ". If there are problems now there must have been some change to the connections or to the program. What was changed?

...R

I hope the new scheme is less easy to misunderstand:

the program has remained unchanged probably the assembly is not correct

but I don't understand where the error is

I reckon you are using the wrong I/O pins for the Wire library. Read the documentation.

...R