How to wake up an electron to load new code?

I have a new (of course) Electron that I have loaded some code on …which has a sleep function fro 5 minutes…wakes up reads some devices, connects to a webpage, dumps the readings and goes back to sleep. It is only " awake" for 15 seconds or so.

My question how do I connect to it with Particle Build or dev to load new code when it is asleep most of the time?

David G.

1 Like

One thought that came across my mind would be to code in a predetermined wakeup time like 12PM where you program the Electron to wake up for a 5 to 10 min window where you can catch it online long enough to do a firmware update.

Just a though that should work considering you can pull the correct time from the cellular network.

Good idea!

I guess at the moment I can just push the mode button and start over again.

D. Garrison

It really is a good question and one I had not thought up a easy answer to until right now.

We are waking ours up to upload data to a website. We changed our response codes to say 'hey that was successful, but I also have a code update for you." so a 200 is normal, a 201 says wait for code update. Then the server just executes the 'particle flash commands and records the update number.

B Lewis

1 Like