ok, have to correct myself. for above code snipped I set the interval to 20 sec, but the fail timeout was still at 30 seconds. I changed that to a put reqwuest every 30 secs and fail timeout to 20 secs.
It makes sense I guess and works nicely now:
save()
=undefined
Erasing Flash.....................
Programming 36000 Bytes.......................................
Checking...
Done!
Running onInit()...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":45,"light":64,"vref":3.289909638554216808614}
-->
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
==> Closed.
Timed out, disconnecting...
ERROR: Unknown Timeout
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":25,"light":64,"vref":3.289909638554216808614}
soil_humidity value set to average, was: 25
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":25,"light":64,"vref":3.292113194909577877922}
soil_humidity value set to average, was: 25
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":48,"light":63,"vref":3.292113194909577877922}
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
Timed out, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":53,"light":63,"vref":3.292113194909577877922}
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
Timed out, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":67,"light":64,"vref":3.292113194909577877922}
soil_humidity value set to average, was: 67
-->
==> Closed.
Complete, disconnecting...
It still runs into a cc3000 issue quite often, but it keeps running :-) Will put the sensors back and will let it run over night.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
ok, have to correct myself. for above code snipped I set the interval to 20 sec, but the fail timeout was still at 30 seconds. I changed that to a put reqwuest every 30 secs and fail timeout to 20 secs.
It makes sense I guess and works nicely now:
It still runs into a cc3000 issue quite often, but it keeps running :-) Will put the sensors back and will let it run over night.