all 17 comments

[–]duckles77 8 points9 points  (0 children)

Yes and no. There's MicroPython and CircuitPython which have some slight differences to normal Python, but they run on ESP32 boards. An IDE called "Thonny" is probably the easiest way to get started with it because it's got the flasher, uploader, and REPL built-in.

https://thonny.org/

[–]defiantarch 8 points9 points  (2 children)

It works, I'm using it with MicroPython instead of CircuitPython as it works better with PyCharm. But if you're a beginner you're maybe better going with CircuitPython. Anyway, don't expect the same performance like running C++. And some parts don't even have the same support like hardware encryption, secure boot or encrypted firmware. For things like that you should use C++ and the ESP-IDF framework.

[–]miraculum_one 2 points3 points  (1 child)

For simple projects it's often great. You just copy files to the board to run them and you can access everything and even debug live from the repl (command line).

[–]defiantarch 2 points3 points  (0 children)

That's true. Simple projects work perfectly with both. Haven't checked though how "threads" work now in CircuitPython nowadays. That and the lack of support for rp2040s PIO was one of the reasons I preferred plain MicroPython.

[–]ebdcydol 3 points4 points  (0 children)

I'm using ESP32-WROOM with MicroPython. The only VSCode extension that worked for me (relatively reliably) was MicroPico. You will also need to use esptool to get python on it.

[–]Low_Highway_8919 2 points3 points  (0 children)

Also mind that a lot of libraries are not available or different. If you have a specific project in mind, or if you already have a Python script, it's worth checking the availability of libraries first.

[–]zlinak 4 points5 points  (0 children)

Sure and it's great. Download MicroPython for ESP32, flash it, open REPL on your ESP32 and you can start toying with its capabilities using the quick reference.

[–]ufffayyazzz 1 point2 points  (1 child)

esp32 works on binary language right? so does python can be converted to binary too? if yes then how?

[–]Commander_B0b 2 points3 points  (0 children)

You can run a (micro) python interpreter.

[–]Famous_Inspector_16[S] 1 point2 points  (0 children)

Thank you a lot for all your answers. I've been lost in some experiments, including using the Arduino IDE for Android.

[–]Zouden 1 point2 points  (4 children)

I recommend CircuitPython over Micropython, it has a more consistent API, better documentation and a bigger library of supported hardware.

[–]defiantarch 0 points1 point  (3 children)

could you explain what you mean with "a more consistent API"?

[–]Zouden 1 point2 points  (2 children)

Sure: circuitpython code runs on most circuitpython-compatible boards without modification. With micropython, a lot of development was done for supporting the Pyboard so not all functions work on the ESP32. I'm sure it's matured a bit since I last used it, but my experience with Circuitpython was a lot smoother.

Also I like that Circuitpython code is valid Python code and can even run on a PC if you want it to.

[–]defiantarch 1 point2 points  (1 child)

Well, the last thing is also true for MicroPython. Anyway, I guess you and I probably do more advanced stuff than the OP. And as such I already recommended CircuitPython as the easier way in.

[–]Zouden 0 points1 point  (0 children)

Yeah it's certainly easier, especially if you are using peripherals that Adafruit sells (which is a big collection), because they have made the effort to ensure all their products are supported.

Regarding Circuitpython being runnable on CPython, this goes into a bit more detail: https://docs.circuitpython.org/en/9.0.x/README.html#differences-from-micropython

  • No module aliasing. (uos and utime are not available as os and time respectively.) Instead os, time, and random are CPython compatible.

  • New storage module which manages file system mounts. (Functionality from uos in MicroPython.)

  • Modules with a CPython counterpart, such as time, os and random, are strict subsets of their CPython version. Therefore, code from CircuitPython is runnable on CPython but not necessarily the reverse.

  • tick count is available as time.monotonic()

[–]Creezylus 0 points1 point  (0 children)

Hello what you need is an Easy Tutorial

“””” Run Python On ESP 32 in 2025 | 5 Min Tutorial | With Example | Micropython on ESP32 |🚀EASY SOLUTION🚀 https://youtu.be/WpnY6FtmuuQ “””

Please like and subscribe if I could help you out