i'm running a Yun for monitoring 2 sensors. He outputs the sensor data every 5 seconds to a thingspeak account.
On the Yun there is a (working) 3G HuaweiE303 dongle, Wifi signal is good . I have these two options bc the boards needs to be installed on several different places where we are not always sure that there is ethernet or wifi available.
Now, when i boot the board (no utp cable is attached) it starts to send out data perfectly. But sometimes, it hangs on this piece of code. I recognice that bc the LED stays on.
digitalWrite(led, HIGH); HttpClient client; String request_string = thingspeak_update_API + thingspeak_write_API_key + thingspeakfieldname1 + temp + thingspeakfieldname2 + hum + thingspeakfieldname3 + cnt; client.get(request_string); digitalWrite(led, LOW);
I tried to 'solve' this by adding a watchdog in the setup and call the reset every time the loop passes.
That works, but it happens way too much. I have no idea what is going on, sometimes it even happens that my linux side hangs. am i calling the httpclient too often ?
Next to that, i'm haven't tested this so far, but will the Yun try to send it's data over 3G when Wifi isn't available?
Thanx so far.