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. 15 Apr, 2016 1 commit
  3. 12 Apr, 2016 1 commit
  4. 06 Apr, 2016 1 commit
  5. 04 Apr, 2016 2 commits
  6. 25 Mar, 2016 3 commits
    • Damien George's avatar
      b62beada
    • Damien George's avatar
      esp8266: Add PWM support. · 632d8efa
      Damien George authored
      PWM implementation uses a timer and interrupts (FRC1), taken from
      Espressif's/NodeMCU's implementation and adapted for our use.
      
      8 channels are supported, on pins 0, 2, 4, 5, 12, 13, 14, 15.
      
      Usage:
      
          import machine
          pwm0 = machine.PWM(machine.Pin(0))
          pwm0.freq(1000)
          pwm0.duty(500)
      
      Frequency is shared (ie the same) for all channels.  Frequency is
      between 1 and 1000.  Duty is between 0 and 1023.
      632d8efa
    • Damien George's avatar
      esp8266: Implement software SPI class. · 82b95f62
      Damien George authored
      Supports speeds up to 500k baud, polarity=0/1, phase=0/1, and using any
      pins.  Only supports MSB output at the moment.
      82b95f62
  7. 24 Mar, 2016 1 commit
  8. 09 Mar, 2016 1 commit
  9. 05 Mar, 2016 1 commit
  10. 04 Mar, 2016 5 commits
  11. 19 Oct, 2015 1 commit
  12. 13 Feb, 2015 1 commit
  13. 28 Jan, 2015 1 commit
    • Damien George's avatar
      py: Change vstr so that it doesn't null terminate buffer by default. · 0d3cb672
      Damien George authored
      This cleans up vstr so that it's a pure "variable buffer", and the user
      can decide whether they need to add a terminating null byte.  In most
      places where vstr is used, the vstr did not need to be null terminated
      and so this patch saves code size, a tiny bit of RAM, and makes vstr
      usage more efficient.  When null termination is needed it must be
      done explicitly using vstr_null_terminate.
      0d3cb672
  14. 01 Jan, 2015 1 commit
  15. 27 Nov, 2014 1 commit
  16. 25 May, 2014 1 commit
  17. 07 May, 2014 1 commit
  18. 03 May, 2014 2 commits
  19. 02 May, 2014 1 commit
  20. 05 Apr, 2014 1 commit
  21. 29 Mar, 2014 1 commit
  22. 22 Mar, 2014 1 commit