1. 21 Apr, 2016 1 commit
    • Damien George's avatar
      esp8266: Implement basic deep-sleep capabilities. · 32d7cf6e
      Damien George authored
      Use the machine.deepsleep() function to enter the sleep mode.  Use the
      RTC to configure the alarm to wake the device.
      
      Basic use is the following:
      
          import machine
      
          # configure RTC's ALARM0 to wake device from deep sleep
          rtc = machine.RTC()
          rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
      
          # do other things
          # ...
      
          # set ALARM0's alarm to wake after 10 seconds
          rtc.alarm(rtc.ALARM0, 10000)
      
          # enter deep-sleep state (system is reset upon waking)
          machine.deepsleep()
      
      To detect if the system woke from a deep sleep use:
      
          if machine.reset_cause() == machine.DEEPSLEEP_RESET:
              print('woke from deep sleep')
      32d7cf6e
  2. 20 Apr, 2016 3 commits
  3. 19 Apr, 2016 2 commits
  4. 18 Apr, 2016 2 commits
  5. 17 Apr, 2016 6 commits
  6. 16 Apr, 2016 1 commit
  7. 15 Apr, 2016 1 commit
  8. 14 Apr, 2016 11 commits
  9. 13 Apr, 2016 4 commits
  10. 12 Apr, 2016 5 commits
  11. 11 Apr, 2016 4 commits