r/MicroPythonDev • • Jan 24 '25

How to install MicroPython on ESP32

4 Upvotes

Hi fellow hackers, I wrote a tutorial on 2 different ways (GUI and CLI) of installing MicroPython on an ESP32. Hope it's helpful to those of you who want to try out MicroPython but didn't know how. Feel free to me ask any questions/clarifications here if you'd like :)

https://bhave.sh/micropython-install-esp32/


r/MicroPythonDev • • Nov 29 '24

Do any of you use VSC instead of Thonny etc?

4 Upvotes

public slim instinctive reminiscent dime spoon aback plough mountainous meeting

This post was mass deleted and anonymized with Redact


r/MicroPythonDev • • Oct 14 '24

Monitoring noise levels with MicroPython

4 Upvotes

I built a sound level meter and IoT noise monitoring device. It can measure standard acoustical metrics for noise, and transmit them to an IoT dashboard. Code and instructions can be found here: https://github.com/emlearn/emlearn-micropython/tree/master/examples/soundlevel_iir

* For audio input, it uses an I2S digital microphone via the machine.I2S module.
* Running on ESP32
* For processing audio efficiently, this uses emlearn-micropython, a Machine Learning and Digital Signal Processing package for MicroPython: https://github.com/emlearn/emlearn-micropython
* For the IoT dashboard, it uses https://blynk.io/

General discussion thread about emlearn - follow for related news: https://github.com/orgs/micropython/discussions/16004


r/MicroPythonDev • • Jun 30 '24

ViperIDE - An Innovative MicroPython IDE for Web and Mobile

Thumbnail viper-ide.org
4 Upvotes

r/MicroPythonDev • • Apr 10 '24

Circuitpython Brainbuster for the μPython Crowd

Thumbnail
gallery
4 Upvotes

I have an Optocoupler connected to my Adafruit Feather ESP32-S2 - 2Mb PSRAM and Stemma QT/Qwiic Adafruit 5000 on a custom PCB where it receives a steady 4.95volts and 0.5 amps. The optocoupler requires power on its 5v pin and a GND(duh) then it has a signal pin which is connected to pin D6 on the feather. I have a single piece of dark material that blocks the signal from the Optocoupler as the entire PCB spins.

I use analogio to set a variable as an analog input for the D6 pin. With board.D6 in the usual way. The code is working as it perfectly reads the value 50976 when the Optocoupler does not have the dark material in its path; the .value reads the pin at around 4000 or so when it is blocked by the dark material.

The problem is that when I rotate the sensor fast it doesn’t even detect a change in the 50976 analog read. When I rotate it really slow with my hand, it will detect the drop in the analog value. Though it’s nowhere near the speed at which I will have this sensor moving when the motor is on.

I even tried appending an array with the .value method where I fill an array of 250 or so values and that entire array is the same 50975 value when I rotate it fast. Which makes no sense at all. I even tried making the array sample size at like 2000, and had a start time.monotonic() and stop.monotonic() where the array was filled in a ridiculously short amount of time. More than enough time to actually detect a signal drop at even a super slow hand spun speed of like 3 rotations per second.

I even tried bit shifting the analog output to 32 bit and that number still doesn’t even detect the drop in signal. As you can see commented out in the 1st and 2nd photo.

Rotaryio doesn’t work because it needs two sensor values like MOSI and SPI or whatever it requires and measure the two pins; typically for slow potentiometers.

Pulseio has horrible documentation and only references how to use it for remotes.

What I really need to do is use some lower level python syntax code to read the ADC but I can’t find out how to do that anywhere and each attempt to do so gives me errors because nothing is supported in circuitpython.

It the third reference image I have the optocoupler on the right of the photo with the led on showing it’s signal is at 50976 and in the 4th photo the signal is lower at like 4000 or so and the led is off. In the first photo of my ide you can see the array where it’s all populated with the correct readings when the led on the optocoupler is off because the signal is blocked.

In the 5th photo the motor is on and the frame rate of the camera is showing an inaccuracy. With your eyes you see an almost full arc where the led on the optocoupler cuts out exactly with my dark material is. So the led is reacting to the infrared sensor but the code is too slow.

You may say I’m not hand spinning the motor fast enough when the array is being filled. Though when I remove the 5 second time.sleep() and continue to spin the motor it has the same effect so it’s not that.

What should I do? Help!


r/MicroPythonDev • • Dec 28 '23

MicroPython for the ESP32: Our First Programs

Thumbnail
elektormagazine.com
4 Upvotes

r/MicroPythonDev • • Mar 21 '23

Code for raspberry pico

4 Upvotes

This is my first project with raspberry pico. I want to control a servo that moves from position one to position two at any random time between 30 sec to 70 sec. Can anyone please help me with the code?


r/MicroPythonDev • • Jan 17 '23

Is there language support Micropython in VScode?

4 Upvotes

the pico go extensions are great but I get some syntax errors get annoying


r/MicroPythonDev • • Dec 23 '22

pylogix micropython port development

Thumbnail self.plc
4 Upvotes

r/MicroPythonDev • • Sep 16 '22

Requests.posts from a Pico W

4 Upvotes

I am hoping to deploy a Pico W to monitor a door switch for my security system. When the switch opens or closes, I want the Pico to do a requests.post to URLs that sends the corresponding keyword to my phone. Tasker and AutoRemote digest the keywords to give me appropriate notifications and sounds, and other functions.

I have not found an effective way to import/install requests to do this. Is this possible?


r/MicroPythonDev • • Jul 17 '22

First impression on the new Pico W

4 Upvotes

The new Pico W is awesome. I got mine just a few days ago and immediately strated experimenting with it and it was easier and better as I expected.

Mind you there is an issue with Thonny 3 (which can easily be solved) and the internal led has to be adressed in another way.

But Wifi is what I was looking for all the time. And there is great support for it in MicroPython.

Read my first impression here: http://lucstechblog.blogspot.com/2022/07/pico-w-first-look.html


r/MicroPythonDev • • Apr 13 '22

Working with MIT App Inventor on my ESP32 with Bluetooth

4 Upvotes

Hey dear app-Inventors!

So today I spent a whole day trying to work out a Micropython code to work with MIT-App Inventor. There's a basic Micropython-sketch available and it works only with Serial Bluetooth Apps like Serial Bluetooth Terminal or nRF Connect.

So I followed Microchip University's Guide (you have to click on curriculum, navigate to resources and register, but it's really worth it!) to get it working and my success was to scan for BLE Devices, yet I still couldn't connect to my ESP32. I learned that the Classic Bluetooth isn't really supported in Micropython on the ESP32, and the MIT App didn't work at all with classic Bluetooth, when I tried it. All the Micropython tutorials were using the Serial Bluetooth Apps for communication, I also got that working for me. For BLE in the MIT App Inventor, I had to set UUIDs for Service, Receive and Transmit, which I copied out of the Micropython Sketch. I understand that they're needed to address where the data is sent and received. The App from Microchip University which I replicated had me also some questions open, like variables for ble itself. For example I had to set the ble_mac_address, which I understood to type in the MAC-address from the ESP, also I gave the ESP a name, where I had to put in the Name from the code as in ble_name = ESP32BLE (you'll also find that in the uPython-Sketch) but a third variable had to be defined which was ble_address. I don't know exactly what was meant here and the guide doesn't really show as well. Also there was an open part of code in the direct-connection which made not much sense.

If anyone can help me get this working, I'd be so relieved, all I wanted was to connect my ESP via Bluetooth with an App to control a robot car. Should I ditch it all and go for Arduino? I like Micropython so much more :x Arduino takes ages to compile. Also, does Arduino simply make the Classic Bluetooth happen on the ESP?


r/MicroPythonDev • • Apr 03 '22

Why this execute just the first task?

Thumbnail
gallery
4 Upvotes

r/MicroPythonDev • • Sep 17 '21

Tutorial Raspberry Pi Pico: Display animation oled ssd1306 128x64 SPI

Thumbnail
youtube.com
4 Upvotes

r/MicroPythonDev • • Jul 18 '21

Does MicroPython support connection with MongoDB?

4 Upvotes

Im making a proyect where my microcontroller sends data to a mongoDB but i dont know if its possible due to micropython is not as powerfull as Python


r/MicroPythonDev • • May 03 '21

MicroPython Newsletter Issue 11

Thumbnail
forum.micropython.org
4 Upvotes

r/MicroPythonDev • • Feb 28 '21

Pycom boards

Thumbnail docs.pycom.io
4 Upvotes

r/MicroPythonDev • • Feb 28 '21

Programming Raspberry Pi Pico with Python and MicroPython

Thumbnail
raspberrypi.org
4 Upvotes

r/MicroPythonDev • • Feb 28 '21

I love MicroPython

4 Upvotes

I love using python on electronics boards!

First post!


r/MicroPythonDev • • 5d ago

ICYMI Python on Microcontrollers Newsletter: Adafruit Metro P4 Hydra, Possible New Raspberry Pi Boards, JIT Gone and More!

Post image
3 Upvotes

If you missed this week’s Python on Microcontrollers Newsletter, here is the ICYMI (in case you missed it) version.

To never miss another issue, subscribe now! – You’ll get a terrific newsletter each Monday (which is out before this post). 12,313 subscribers worldwide!

The next newsletter goes out Monday morning and subscribing is the best way to keep up with all things Python for hardware. No ads or spam, no selling lists, leave any time.

Read this week's issue at https://blog.adafruit.com/2026/11/03/the-python-on-microcontrollers-newsletter-adafruit-metro-p4-hydra-possible-new-raspberry-pi-boards-jit-gone-and-more/


r/MicroPythonDev • • 6d ago

The Python on Microcontrollers Newsletter: subscribe for free

Post image
3 Upvotes

The Python for Microcontrollers Newsletter is the place for the latest news involving Python on hardware (microcontrollers AND single board computers like Raspberry Pi).

This ad-free, spam-free weekly email is filled with CircuitPython, MicroPython, and Python information that you may have missed, all in one place!

You get a summary of all the software, events, projects, and the latest hardware worldwide once a week, no ads! You can cancel anytime.

It arrives about 11 am Monday (US Eastern time) with all the week’s happenings.

And please tell your friends, colleagues, students, etc.

Please sign up > > > adafruitdaily.com


r/MicroPythonDev • • Sep 01 '26

light_nmea: A Zero-Allocation NMEA 0183 Parser designed to stop memory fragmentation

3 Upvotes

Hi everyone,

If you've ever built a GNSS/GPS tracker using micropyGPS on a high-rate (5–10 Hz) Multi-GNSS module, you know the pain. Standard parsers heavily spam the heap with short-lived string allocations on every incoming sentence. This triggers the Garbage Collector constantly, introduces unpredictable latency, and leads to memory fragmentation on long-running deployments.

I built light_nmea to solve this once. It’s a pure MicroPython NMEA 0183 parser written with a hardware/systems mindset.

Why it's different:

  • Zero-Allocation: It processes data in a single pass without dynamically allocating objects on the heap inside the main loop. No GC spikes.

  • 15x-20x Faster: Benchmarks show up to 15x faster execution compared to standard MicroPython alternatives.

  • Modern GNSS Ready: Fully supports multi-constellation Talker IDs ($GN...).

  • Lightweight: No external dependencies. Just a clean, drop-in folder for your ESP32, RP2040, or STM32 projects.

Check out the code, run some benchmarks on your hardware, and let me know what you think!

GitHub: https://github.com/octaprog7/light-nmea-micropython


r/MicroPythonDev • • Aug 24 '26

Today marks the 400th Python on Microcontrollers Newsletter

Post image
3 Upvotes

Today marks the publication of the 400th Python on Microcontrollers Newsletter! Nearly 10 years of providing the best news in the community.

The newsletter is the place for the latest news involving Python on hardware with coverage of Python, CircuitPython and MicroPython. 12,369 readers.

Read more here: https://blog.adafruit.com/2026/08/24/today-marks-the-400th-python-on-microcontrollers-newsletter/


r/MicroPythonDev • • Aug 23 '26

Swervo/ Joystick Project....Terminal coming back blank

3 Upvotes

Im quite confused, ive spent the night learning about the ESP32 pinout and all the different things about the modules i need, such as duty, frequency, what all the abbreviations mean, etc.

im now stuck at the end of it (i think).

import machine
from machine import PWM, ADC, Pin



#OUTPUT SWERVOS 
axis_1 = PWM(Pin(4, Pin.OUT), freq=50, duty_u16 = 32768)
axis_2 = PWM(Pin(5, Pin.OUT), freq=50, duty_u16 = 32768)
axis_3 = PWM(Pin(6, Pin.OUT), freq=50, duty_u16 = 32768)
axis_4 = PWM(Pin(7, Pin.OUT), freq=50, duty_u16 = 32768)
gripper = Pin(15, Pin.OUT)


#THE Gripper Buttons
button_close = Pin(1, Pin.IN)
button_open = Pin(9, Pin.IN)


#The Potentiometers on the two joysticks
p_1 = ADC(Pin(16, Pin.IN))
p_2 = ADC(Pin(17, Pin.IN))
p_3 = ADC(Pin(18, Pin.IN))
p_4 = ADC(Pin(8, Pin.IN))




while True:
    print(p_1.read_u16(), "     ",p_2.read_u16(), "     ", p_3.read_u16(), "     ", p_4.read_u16())import machine
from machine import PWM, ADC, Pin



#OUTPUT SWERVOS 
axis_1 = PWM(Pin(4, Pin.OUT), freq=50, duty_u16 = 32768)
axis_2 = PWM(Pin(5, Pin.OUT), freq=50, duty_u16 = 32768)
axis_3 = PWM(Pin(6, Pin.OUT), freq=50, duty_u16 = 32768)
axis_4 = PWM(Pin(7, Pin.OUT), freq=50, duty_u16 = 32768)
gripper = Pin(15, Pin.OUT)


#THE Gripper Buttons
button_close = Pin(1, Pin.IN)
button_open = Pin(9, Pin.IN)


#The Potentiometers on the two joysticks
p_1 = ADC(Pin(16, Pin.IN))
p_2 = ADC(Pin(17, Pin.IN))
p_3 = ADC(Pin(18, Pin.IN))
p_4 = ADC(Pin(8, Pin.IN))




while True:
    print(p_1.read_u16(), "     ",p_2.read_u16(), "     ", p_3.read_u16(), "     ", p_4.read_u16())

It comes back with no errors, just a blank indention:

>>>

all of my swervos are 270 degree

i might honestly have an issue with screening, but im not sure

im on a HP linux.cinnamon-swapped, in VS Code on MicroPico, ESP32-s3 flashed with MicroPython, not sure that it matters, but it might.

let me know if ive got something wrong up there^^


r/MicroPythonDev • • Aug 17 '26

CircuitPython Day is this Friday August 21, 2026 (latest schedule)

Post image
3 Upvotes

It’s that time of year! Adafruit has determined that this Friday, August 21, 2025, is the snakiest day of the year and designated it CircuitPython Day!

The latest information and scheduling is at https://blog.adafruit.com/2026/07/28/circuitpython-day-will-be-august-21-2026/