Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By btidey
#91953 That method is super optimised and very interesting but maybe a bit radical for easy general use.

You can get connection down to sub 1 second using standard methods and this may be sufficient to get decent battery life if the rate of key presses is relatively low.

To get a fast connect means avoiding the channel scan and using an explicit mac address for the router. This is achieved by including these 2 parameters as part of a wifi connect call. They will then be stored in flash and re-used subsequently even after power off or sleep.

In an arduino environment with wifi manager to manage connections then the fast connect can be handled automatically by using the feature_fastconnect version of that library. This retrieves the channel / mac address when first making a connection and then subsequently uses them. It also handles the changes needed if the channel or mac address of the router change.

You can use the button press to initiate the exit from deep sleep or a more radical method is to use the buton to actually power on the esp8266 module via a MOSFET. This avoids even the background 20uA of deep sleep current. With that method you can use an output to keep the MOSFET tuned on until the transaction completes and then return it to the full power off state.
User avatar
By QuickFix
#91956
Sean Phelan wrote:I'm going to try getting an ESP-01 into a casing like this... https://uk.rs-online.com/web/p/remote-control-fobs/4510668

Once I visited your link, I had an epiphany and remembered an old project done by bitluni :D