DFRobot / DFRobot_SHT20

MIT License
20 stars 20 forks source link

getting 998 when reading data in timer interrupt #1

Closed SayidHosseini closed 2 years ago

SayidHosseini commented 6 years ago

Hi, I've connected SHT sensor to the NodeMCU V 0.9. When reading sensor data in a loop or with a delay mechanism, it works fine. But I'm trying to get the sensor data in a Timer interrupt using the Ticker library on ESP core. it doesn't matter how long this interval is, it just doesn't work. I have also tried using SHT10 sensor with the proper library and the same happens there too. Any idea what the problem might be?

floatAsNeeded commented 3 years ago

Why reading sensor data in the interrupt? In the ISR cycle you should spend the less time possible in it.