Hi Stefan, thanks for your help but unfortunately it's out of the scope of my ask. As you see the code you found is functionally identical to mine, therefore isn't gonna make any difference. Anyway many thanks for your effort. Would appreciate someone with direct experience on Arduino Nano ESP32 micropython coding on ARDUINO LAB FOR MICROPYTHON. For sure I'm missing something big, if my simple use case ("a blinking led") is not working!
unfortunately on ESP32 numbered pins are the CPU's GPIO pins.
D11 is the physical pin 11 on the Nano board, but 11 will refer to GPIO11
Please refer to the pinout on this page and apply the following rule:
I have already asked you kindly once not to play the LMGTFY game, especially since I'm sure you have not tried that on a real board running MicroPython.
Sending a LMGTFY link to a user who came here for help is passive aggressive and I will not excuse this behaviour.
If you do not have a useful answer, please do not feel compelled to "help"
Thank you
Thanks a lot ubidefeo! I was working just now on the issue, it's Saturday after all :-), and reading again the documentation I found the table you're mentioning
Was coming here to explain the mystery but you've been faster.
If I may suggest, a reference to this table by Karl in the led tutorial wouldn't hurt, specially for guys in a rush that don't pay the necessary attention.
Thanks again ubidefeo!
actually with the latest version of MicroPython (Nightly) for ESP32 you should be able to use named pins, but I never remember how since they're not supported on every build.
Will try, thanks. Anyway once you now the "conversion table" it's just a matter of paying attention, not a big deal.
I'm an intense adopter of Arduino MKR wifi1010 and Nano33iot for IOT like kind of education projects, where I'm trying to get students after a proper start on Micro:bit with blocks and python. I read your impressive curriculum and I'm taking the chance to ask a question slightly off topic: for educational purposes on micropython with Arduino Nano ESP32, would you use Arduino Lab for Micropython or OpenMV IDE, or something else?
@apagliari hi, there is a tutorial that hopefully simplifies some of the concepts you are dealing with, the most important difference between the tutorial and your original post is that the tutorial uses millis as opposed to sleep() to create the delay, the millis example is basically a port of blink without delay which is a c/c+ example in the arduino ide. Even though your problem is now solved it would still be worth while to check out the tutorial @ MicroPython simple GPIO control
After 15 years teaching Arduino I switched my courses to MicroPython.
Initially I used the Nano RP2040 which is an incredible board, and the first affordable high quality board from Arduino supporting MicroPython.
I work at Arduino since 2018, so I have some bias there
If you look at Lab for MicroPython you'll find an incarnation of the Arduino spirit, I'm the internal owner of that editor and it's the one I use in my classes.
I don't like any of the other options, this is why I pushed for this to happen.
When I have to develop big projects I tend to use VS Code and mpremote but to be honest in class Lab for MicroPython is the one my students like the most.
It's still got its quirks, but it's easy on the eyes and feels simple.
OpenMV does not yet support the ESP32 (no firmware available for it) but I think can be used as an editor.
It is endorsed by Arduino, but I don't particularly like its interfaces and if you don't need to do MV things there's no real need to use it.
I'm not sure Micro:bit works with Lab for MicroPython, to be honest.
Some manufacturers of hardware choose to have custom builds of MicroPython which are not exactly REPL friendly unless you use some custom command sequences (see M5 Stack's MicroPython or MakeBlock CyberPi).
We chose to always be aligned to MicroPython upstream and to contribute there, rather than make our own build.
We feel it's the right thing to do, and so we'll continue on this path
Thanks suguy for both the tutorial I've read with interest: you're right it's exploring the same topic, which by the way is of the utmost importance while approaching the basics/grounding first steps of Micropython and Arduino. And highly appreaciated your suggestion for Micropython editor as well: I've used Thonny in the past while using Raspberry and I found it very useful
Hi there @apagliari , thanks for the feedback regarding the pin table (I'm the author of the tutorial). Good to know it wasn't that easy to find, I will add a reference to that pin table in the tutorial!
And of course thank you @ubidefeo for helping out!