WiFi-tutorial: How to wake from sleep?

  • I'm testing Using the Network tutorial, with following monoWakeFromReset function:

    void AppController::monoWakeFromReset() {
      redpine::Module::setupWifiOnly("SSID", "PASSWORD");
        this, &AppController::networkReadyHandler);

    Now when waking from sleep I can just use lazy way:

    void AppController::monoWakeFromSleep() {

    But if I want to do this properly, do I need to repeat all of redpine::Module::initialize, redpine::Module::setupWifiOnly and redpine::Module::setNetworkReadyCallback or is some of this state remembered after sleep?

  • @malaire said in WiFi-tutorial: How to wake from sleep?:

    or is some of this state remembered after sleep?

    Not after sleep mode. The Wifi module uses a lot of power, so we turn it off in sleep. After sleep you will need to initialize and setupWifiOnly.


    The Wifi module is powered by the 3V3 power line, which also powers the display, thermometer and accelerometer. To preserve power, this power line is cut in sleep mode.

Log in to reply