8000 SHT40 Raspberry Pi Pico Arduino Earle Phillhower · Issue #35 · Sensirion/arduino-sht · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content < 8000 span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full">
SHT40 Raspberry Pi Pico Arduino Earle Phillhower #35
Open
@TheLennyLeonard

Description

@TheLennyLeonard

Hello, I have a problem with your library in arduino with Earle Phillpower library. I use your SHTSensor library, i think correctly but still not getting responses from SHT40. Can you please help me? (it is correctly wired - power 3,3V, pull up for SDA,SCL - 2,2kOhm resistors)

the SHT40 is connected to
GP14 --> PIN 19 on the Pico
GP15 --> PIN 20 on the Pico
`
#include <Wire.h>
#include "SHTSensor.h"

SHTSensor sht(SHTSensor::SHT4X);

float actualTemperature = 99.9;
float actualHumidity = 99.9;

void setup() {
pinMode(14,INPUT);
pinMode(15,INPUT);
Wire1.setSDA(14);
Wire1.setSCL(15);

Wire1.begin(0x44);

Serial.begin(9600);
while (!Serial)
delay(10);

if (sht.init()) {
Serial.print("init(): success\n");
} else {
Serial.print("init(): failed\n");
}
sht.setAccuracy(SHTSensor::SHT_ACCURACY_MEDIUM);
}

void loop() {
if (sht.readSample()) {
actualHumidity = sht.getHumidity();
Serial.print(actualHumidity, 2);
Serial.print("\n");
Serial.print(" T: ");
actualTemperature = sht.getTemperature();
Serial.print(actualTemperature, 2);
Serial.print("\n");
Serial.print("Reading SHT40 Data...OK\n");
} else {
Serial.print("Error in readSample()\n"); // this is being displayed in serial monitor - so sht.readSample() doesnt read anything
}
delay(1000);
}
`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0