Коррекция показаний датчика SHT10

Вячеслав 151
Offline
Зарегистрирован: 25.03.2015

Доброго дня!

Собран термогигрометр на UNO  и SHT10. Вывод на LCD1602.

Показания термометра завшены градусов на 10. Влажность не сравнивалась. Кто встречался с аналогичным случаем и как отредактировать?

[code]
/**
 * ReadSHT1xValues
 *
 * Read temperature and humidity values from an SHT1x-series (SHT10,
 * SHT11, SHT15) sensor.
 *
  */

#include <SHT1x.h>

// Specify data and clock connections and instantiate SHT1x object
#define dataPin  10
#define clockPin 11
SHT1x sht1x(dataPin, clockPin);
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
  
  lcd.init();                      // initialize the lcd 
 
  // Print a message to the LCD.
  lcd.backlight();
  lcd.print("TEMP GIGR");
   lcd.setCursor(0, 1);
  lcd.print(" Prosvirin VV");
  delay(2000);
  lcd.clear();
 
  
}

void loop()
{
  int temp_c;

  int humidity;
  
 // Read values from the sensor
  temp_c = sht1x.readTemperatureC();
  
  humidity = sht1x.readHumidity();
  // Print the values to the LCD
  
  lcd.print("Temperature: ");
  lcd.print(temp_c, DEC);
  lcd.print("C / ");
 lcd.setCursor(0, 1);
  lcd.print("Humidity: ");
  lcd.print(humidity);
  lcd.println("% ");
lcd.setCursor(0, 2);
  delay(1000);
}

[/code]

 

eev
Offline
Зарегистрирован: 07.01.2018