Skip to content
Discussion options

You must be logged in to vote

For the ESP32 port, the purpose of the modules/machine.py file is to include the Counter and Encoder from esp32.PCNT and make these functions more accessible.

The help("modules") command returns two machines because 1) the C module extmod/modmachine.c and 2), the frozen Python module ports/esp32/modules/machine.py.

The machine.py overwrite modmachine.c so import machine execute machine.py which will then include Counter and Encoder functions together with the functions defined in the modmachine.c into the machine namespace.

This could be the cause of the problem when you run help(machine). There may be a subtle bug in the py/builtinhelp.c program. I build my own firmware and never include…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by fdufnews
Comment options

You must be logged in to vote
3 replies
@shariltumin
Comment options

@fdufnews
Comment options

@shariltumin
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
2 participants