I am using an ELECTRON and controlling it remotely with Blynk. I want to be able to perform a soft power down of the ELECTRON using a virtual button widget in Blynk. It would appear from reading the docs that buttonMirror() might be the way to do this. Has anyone tried using a button widget assigned to a virtual pin (in Blynk) to perform a soft power down?
After reading what buttonMirror does, I don’t think that’s what you are after. The buttonMirror allows you to mirror the MODE button to another physical pin on the Electron. Looks like you want to power down the Electron via a virtual button on Blynk. If you can create a button on Blynk to activate a GPIO, then I’m sure you can also do some sort of sleep with it as well. You first have to figure out which Electron sleep mode best fits the behavior you desire. You may want to also digest this guide on selecting sleep modes:
After you determine that, you would do something like this pseudo code:
@ninjatill Thanks very much for your reply and the detailed information you provided. You are correct in that I want to be able to power down the Electron via a virtual Blynk button widget. Creating the virtual pin to control the GPIO is something that I have done before, so that is where I will start.
@ScruffR Thanks for the information you have provided as well.
WKP will be accomplished via a physical button push as you have suggested.
Thank you both again for pointing me in the right direction
If you use Network_Standby Sleep mode, you’ll be able to also wake the Electron from the Cloud.
Of course, this will draw more current than SoftPowerOff.
I’m not sure if this is a viable option for your project, but it’s a cool feature !