Seeed-Studio / Grove_Temper_Humidity

Grove_Temper_Humidity based on TH02 & TH06
MIT License
9 stars 13 forks source link

TH02 does not work on Intel Edison #2

Closed gustavotemple closed 3 years ago

gustavotemple commented 7 years ago

Hello,

@jeferrb and I, we are trying to use the TH02 on Intel Edison, but in environments with A/C (< +22°C ~ +24°C) this code below does not work (program get stuck) after few minutes:

#include <Wire.h>
#include <TH02_dev.h>
#include "rgb_lcd.h"

rgb_lcd lcd;

int counter = 0;

void setup() {
    lcd.begin(16, 2);
}

void loop() {
    float temperature = TH02.ReadTemperature();
    lcd.clear();
    lcd.print("loop() [");
    lcd.print(++counter);
    lcd.print("]");
    lcd.setCursor(0, 1);
    lcd.print(" - Temp: ");
    lcd.print(temperature);
    lcd.print(" C");
}

There is sometime related with this issue below? https://github.com/intel-iot-devkit/upm/issues/351

KillingJacky commented 7 years ago

Hi, sorry for the late reply, do you still have this issue now? If so, what kind of "not work" do you mean? program get stuck? temperature not accurate?

gustavotemple commented 7 years ago

Hello @KillingJacky, Yes, the program get stuck

KillingJacky commented 7 years ago

OK, program getting stuck means the I2C reading fails all the time, and the library falls into a while true loop. Typically this may happen when the sensor is placed to work under critical environment. From your description, very cold enviroments (< 24°C), 24°C can't be said very cold, can I suppose it to be -24°C? If so, from the specification of this sensor, it only works under:

Humidity: 0% - 80% RH 
Temperature: 0 ~ 70 °C

Please refer to http://wiki.seeed.cc/Grove-TemptureAndHumidity_Sensor-High-Accuracy_AndMini-v1.0/

gustavotemple commented 7 years ago

Hello @KillingJacky,

Sorry, I fixed the description, I live in Brazil, so +22°C is very cold for us.

This was the answer from the Intel Corporation:

https://communities.intel.com/message/500271