ricki-z / SDS011

Arduino library for SDS011 dust sensor
GNU General Public License v3.0
81 stars 53 forks source link

wdt reset because of WiFi client in Telegrambot Lib function and Pin interrupt #6

Open Macci0 opened 7 years ago

Macci0 commented 7 years ago

I tried a lot things wrote in this Issue: https://github.com/esp8266/Arduino/issues/1426 My workaround;

ETS_GPIO_INTR_DISABLE(); // interrupt disablen wegen softuart, da sonst wdt reset möglich
IPAddress server(149,154,167,198);
....
client.println("Connection: close"); /// zum speicher frei geben
ETS_GPIO_INTR_ENABLE(); // interrupt enablen/disablen wegen softuart, da sonst wdt reset möglich

In my Telegram-bot Lib. (Connection: close remove also a Bug if you try to send an Email an with Telegrambot usage)

With that workaround there is missing Serial Data. So i do this in my Sketch:

for (int l = 0; l < 20 ; l++)
               { 
                error = my_sds.read(&p25,&p10);
                  if (!error)   {
                                break; 
                                }
                    else       {
                                p25=-2;
                                p10=-2;
                                } 
                delay(100);
                }

TelegramBot Lib: https://github.com/Gianbacchio/ESP8266-TelegramBot

ricki-z commented 5 years ago

@Macci0 Can we close this issue? I can only see a problem with the TelegramBot and WifiClient, but not with the SDS011 lib itself.