Git Product home page Git Product logo

ESP32 micropython deepsleep reasons

Micropython on the ESP32 can be put into deepsleep.

It can be woken from deepsleep from mulitple pins using esp32.wake_on_ext1.

Unfortunately there is no way to find out which particular IO pin woke the device.

Here's a trick if you only have 2 different inputs that are going to wake the device:

Get one to wake_on_ext0, and the other to wake_on_ext1.

machine.wake_reason will then report 2 for wake_on_ext0 and 3 for wake_on_ext1

test it out

Put micropython on your controller

esptool.py --baud 115200 --port /dev/tty.SLAB_USBtoUART erase_flash
esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 115200 write_flash 0x1000  ./esp32-idf3-20200327-v1.12-310-g9418611c8.bin

Copy the code there

ampy put ./main.py main.py

watch the output

screen /dev/tty.SLAB_USBtoUART 115200 -L

@paulcampbell_'s Projects

zombie icon zombie

Insanely fast, full-stack, headless testing using node.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.