Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [micropython]

The tag has no usage guidance.

51 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
349 views

How can i read a digital pins value from another device?

I on a raspberry pi 4 (device 2) and am trying to read a digital data pin from another raspberry pi (device 1) but the value always reads as 0. What do i need to do to make this work? I already tried ...
NtFreX's user avatar
  • 121
2 votes
1 answer
403 views

raspberry pi pico ejects automatically after trying to install micropython

I just bought a raspberry pi pico and I want to install micropython on it. but as soon as I install micropython the device ejects and when reconnect it all files are gone. it has 2 files in it(index....
lemmings's user avatar
1 vote
1 answer
95 views

How to program a RP2040 Chip (I don't have a Pico board, just the chip). I'm building my own PCB for my own needs

I have a rp2040 chip without the pico board. The usual method is to hold the BOOTSEL button, but I don't know which pins are connected to that button (well all I found is it is connected to TP6) but ...
Syed Khalid Hussain's user avatar
1 vote
0 answers
533 views

Debugging micropython code using raspberrypi pico debug probe

I was wondering if there is a way to debug micropython code on raspberrypi pico with/without the "debug probe". Documentations described steps for C language in details, but nothing was said ...
Omid Ataollahi's user avatar
1 vote
0 answers
102 views

Desktop Weather Display using Pi-pico-w

I'm trying to replicate this (https://mustardcorner.com/desktop-weather) project but I'm trying to use the Pico w instead of the Pizero w he was using. But the code obviously does not work on the Pico,...
Jesse gudgeon's user avatar
1 vote
2 answers
2k views

Improving sampling frequency of Raspberry Pi Pico's ADC pin to sample at frequency of 48 KHz

I am trying to use Raspberry Pi pico to sample signal of frequency of around 24 KHz and store the values in an array. From Nyquist criteria, the sampling frequency should be 48 KHz. But I can properly ...
Nimesh's user avatar
  • 11
1 vote
0 answers
551 views

Read serial data from incoming USB device on the Pico

So I am new to using the pico w and I am trying to connect a scoreboard controller device (Daktronics All Sport® 5000) that outputs real time data over serial. I have an RS323 to USB converter that is ...
Juhuxen's user avatar
  • 11
1 vote
0 answers
500 views

OSError: -2, File "urequests.py", line 76, in request

I am working with Pi Pico W, it is already connected to the Wi-Fi, I can see it in the ifconfig() output. Furthermore, I am using this urequests code from https://github.com/micropython/micropython-...
R. Baraiya's user avatar
1 vote
0 answers
251 views

(New user) Pi pico with stepper motor

New to the community, i am a total noob, i have a pi pico project using 28byj stepper motor 5v, looking to control revolutions per day from 600-1200, in both directions, using a rotary encoder. also ...
Lewispipico's user avatar
1 vote
1 answer
338 views

RPi pico W problem importing modules from subdirectory

My directory structure on RPi: / firmware __init__.py functions.py main.py __init__.py is empty, in my main.py, I have: import firmware print(current_version) while functions.py contains just:...
kiero's user avatar
  • 11
1 vote
0 answers
282 views

DS18B20, Pico W, 7 segment display and Micropython

My goal is to connect 2 DS18B20 sensors to a Pico W and display an indoor and outdoor temperature on a 4 digit seven segment display. My problem is it crashes after 20 or so iterations. Thanks for any ...
Joey394's user avatar
  • 11
1 vote
0 answers
435 views

Part of script wont run when named main.py or boot.py

I am using a RaspiPico W RP 2040 with micropython and Im trying to autorun this script when Pico is powered. I plan on powering the pico with an external power brick. The script is a multithreading ...
LeafTeaNeko's user avatar
1 vote
0 answers
127 views

How to connect SD card and battery to Pico?

I have been looking into components I need for a MicroPython project. I needs to be battery powered and be able to read/write to a removable SD card. For this, I have discovered SD breakout boards. ...
SamTheProgrammer's user avatar
1 vote
1 answer
325 views

RpiZero and RpiPico communication through nrf24l01 not receiving packages

I am trying to implement a wireless communication between RpiZero and RpiPico through NRF24l01 modules. Pico is the receiver, and Zero is the transmitter. I have successfully started the Pico ...
Antifa's user avatar
  • 139
1 vote
0 answers
516 views

BME280 sensor on I2C 0 stopped working after adding another one on I2C 1

I have two similar BMP280 sensors. First, I connected one of them to GPIO 16, 17 (SDA, SCL) as well as 3V3 and GND. I ran the following script in MicroPython to read temperature and other measurements:...
Manuel Popp's user avatar
1 vote
0 answers
2k views

Transmitting and Receiving messages through RF433 using Raspberry Pico

I'm currently working in a new DIY project, where I need to send a message through RF from Raspberry Pico, and receive it in an other Raspberry Pico through RF. I have bought some common RF433 ...
Antifa's user avatar
  • 139
1 vote
0 answers
373 views

How can I make the Raspberry Pico not automount as USB storage while using Circuit Python

I am using Circuit Python on a Raspberry Pi Pico to give me hardware buttons for keyboard shortcuts. I am using Circuit Python as opposed to MicroPython because it has the USB_HID library. I don't ...
jsaispasmoi's user avatar
0 votes
1 answer
41 views

Crazy acceleration with EVAL-ADXL373Z

I am extremely new to both Raspberry Pi and working with MicroPython (and i2c protocol). When trying to read data from the EVAL-ADXL373 using Raspberry Pi Pico W I get values ranging from 0 m/s^2 to ...
Emma's user avatar
  • 1
0 votes
0 answers
24 views

How can I use a relay to control an inverter from a Raspberry pi pico?

The inverter has a remote on/off port that can be used with an rj10 cable. I connected an Rj9 cable (The same as Rj10/Rj22, 4p4c) to the port on the inverter, and stripped the other end to get access ...
nn089's user avatar
  • 1
0 votes
0 answers
20 views

micropython not running by itself

so i got the code to work up until power it by a wall outlet. the code runs to to get the wifi with out issue, but then does nothing else during the time it is to turn on. if i connect back to the ...
AmongTheShadows's user avatar
0 votes
0 answers
16 views

Import is erroring with all modules in the root

Noob to Raspberry and Python but otherwise experienced (i.e. tech and development) here. In the root of my Pico, I have these files: mpu9250_jmdev.fake_smbus.py contains this. class FakeSmbus(object):...
Simon's user avatar
  • 101
0 votes
0 answers
51 views

How to enable Raspberry Pico's I2C0_IRQ and set a callback function using MicroPython?

I need to setup a Raspberry Pico as a I2C Slave device. I know how to do this, but I don't know how to eneble the I2C IRQ and set a callback function on it so I can be notified of the I2C events ...
Marus Gradinaru's user avatar
0 votes
2 answers
30 views

Pico W GPIO seems to be not working when under load

I can blink the built-in LED using the standard code, but when running my moderately resource-intensive code, I cannot get the led to blink. I am connecting my Pico with WLAN. I interrupted the loop ...
poloPlaya's user avatar
0 votes
0 answers
7 views

Newb_Python_Checking if a process is running. Seeed XIAO RP2040

Im very new to micro controllers and I recently bought one powered via a Seeed XIAO RP2040 (ANAVI knob 3). I was wondering if there was a way to make the functions of any key dependent to the program ...
Jose's user avatar
  • 1
0 votes
1 answer
43 views

Quasi - simultaneous temperature measurements on a metal rod

I am preparing teaching material for a thermodynamics laboratory for first year Physics students. The students at this point of their study are very capable with Python data analysis, plotting etc. I ...
VG_nbi's user avatar
  • 1
0 votes
0 answers
38 views

Error when loading csv file

So this is my code; I have both my python file and csv file in my raspberry pi pico already as you can see in the image. However, when I run it, it returns an error. #from machine import Pin, I2c #...
dirb's user avatar
  • 1
0 votes
0 answers
13 views

Multi threads ADC read and save on local file rpi pico

im trying to create a voice recorder using max9814 and raspberry pi pico with circuitpython/micropython and my problem is when it saves the recordings on .wav file some parts of the audio loses ...
Alirezaarabi's user avatar
0 votes
0 answers
87 views

Pico W Webserver not responding

I'm playing with setting up a Raspberry Pi Pico Web Server I can get it to connect to my router and the IP address it gives me shows up if I do "arp -a" however if I try to connect with a ...
Big Ian's user avatar
0 votes
0 answers
113 views

Setting RTC alarm

I'm somewhat confused by the use of rtc.irq, more precisely the trigger argument. If I wanted to blink a LED every second using IRQ, the docs say that trigger has to be RTC.ALARM0. Do I have to use ...
Ecir Hana's user avatar
  • 121
0 votes
0 answers
106 views

Connect Raspberry Pi Pico to 93C46 trought Microwire (3-wire Protocol)

i searched to know if someone did that before, but i didn't find anything, some C code to read and write using Arduino, but when i try to convert it i failed because i'm new at MicroPython and ...
Hitotam's user avatar
0 votes
0 answers
175 views

Is it possible connect a Raspberry Pi Pico W to an EDUROAM Wifi (WPA2 authentication)?

Could someone help me? I'm a student at a university, and I'm trying to connect my Raspberry Pi Pico W to the Eduroam Wi-Fi using micropython code, but I'm having trouble. Is it better to use ESP32 to ...
Lilian Mendes's user avatar
0 votes
1 answer
240 views

Playing audio on a Waveshare audio module

I've bought a Pico Audio module - assuming, maybe incorrectly, that being built to fit the Pico, speakers included etc it would be reasonably straightforward to get it working. https://thepihut.com/...
Oli's user avatar
  • 101
0 votes
0 answers
433 views

How would I get audio input to a pi pico?

I’m trying to make an audio visualiser with the pi pico, and I want to connect it to my computer. I need to read the audio from the computer to do this. I could use an audio jack, but I can’t find ...
Commodore 64's user avatar
0 votes
0 answers
107 views

I am trying to print "Hello World" 15 times from my Raspberry Pi Pico to a text file on my windows desktop via serial communication

Here is my code: Main.py (PICO code) import time for i in range(15): print("Hello World") time.sleep(1) Windows Desktop Python Code import serial port = "COM5" ser = ...
HEL's user avatar
  • 1
0 votes
0 answers
20 views

A Micropyhton abstract robot library for pi-pico based robot kits

I'm looking for a slightly higher level Micropyhon library for pi-pico based robot kits. There seem to be many simple robot kits with similar hardware on the market at reasonable prices, but the ...
NeilenMarais's user avatar
0 votes
0 answers
36 views

Unable to perform any WLAN-related operations from core1 on Pi Pico with Micropython 1.20

The following code snippet correctly sets up the Pico Pi W as an AP when run on the main core (core0) def connect(): ssid = 'MicroPython-AP' password = '123456789' #Connect to WLAN ...
Andrew Mayo's user avatar
0 votes
0 answers
79 views

Raspberry Pi Pico accurate sunrise time

Is there a way to access or calculate sunrise and sunset times according to latitude and longitude with a raspberry pi pico ? I can do it with my raspberry pi 3b+ and astral but astral doesnt seem to ...
Coder's user avatar
  • 19
0 votes
0 answers
437 views

Raspberry Pi Pico with PN532 reading cards with the use of interrupt

The setup is as follows: Raspberry Pi Pico PN532 connected via SPI with pico. Pin IRQ on the PN532 is connected to GPIO20 on the pico Micro python Micro python PN532 NFC/RFID control library (SPI) ...
thermike's user avatar
0 votes
0 answers
125 views

Rpi pico zero W - display script not errors

I am a beginner with electronics and coding, trying to get an OLED display with ssd1306 to work with my Rpi Pico W. I have connected the display's SDA and SCL to GP2 and GP3. When trying to run the ...
David's user avatar
  • 1
0 votes
1 answer
840 views

How to setup and use a UART serial interrupt on the RPI PIco?

I have a data logging pico and want to add an interrupt on the serial port that can take in a string and report back the right amount of data stored on the SD card. I was looking at UART.irq but that ...
Michael H.'s user avatar
0 votes
0 answers
59 views

WorldTimeApi client_ip

I am trying to use World Time Api to get the ip address assigned by my ISP. In Micro Python on an RPi Pico W my_ip = json["client_ip"] returns an ipv4 address and in Python3 on a RPi 4B it ...
William Burlingame's user avatar
0 votes
1 answer
368 views

Pi Pico giving error when trying to enable custom hid device

The following is my boot.py file. It's a copypaste from adafruit site. import usb_hid GAMEPAD_REPORT_DESCRIPTOR = bytes(( 0x05, 0x01, # Usage Page (Generic Desktop Ctrls) 0x09, 0x05, # ...
REVOLUTION's user avatar
0 votes
0 answers
242 views

Back and forth communication between Pico and PC

I am making a Pico powered PWM fan controller, and I currently have 2 potentiometers to control the fan speed. I am however thinking about writing some software in Python to modify the speed. The ...
HighElfWisard's user avatar
0 votes
0 answers
637 views

Why does Pi Pico duplicate and mix-up characters received over UART when programmed in C?

I have a Raspberry Pi Pico whose Tx and Rx pins are wired to the Rx and Tx pins of a Wemos D1 Mini development board. The Wemos and the Pico are powered via an external 5V power supply (common ground)....
straits's user avatar
0 votes
0 answers
147 views

DFRobot_RGB1602 library does not work properly with DFRobot DFR0554 and Raspberry Pi Pico

Problem summary: set_cursor(0,0) brings text to (2,1) and set_cursor(0,1) brings text to (3,1), texts goes to imaginary 3rd line before 2nd line as if a 20x4 display. I modified the Python code to ...
Syed Omar Noor's user avatar
0 votes
0 answers
809 views

Raspberry Pi Pico socket module error when trying to use Modbus in micropython

I want to use Modbus library in Pico. First of all, I just try ModbusTCP then ModbusSerial. I am trying to use this https://github.com/techbase123/micropython-modbus GitHub source. When I run the ...
noobinmath's user avatar
-1 votes
1 answer
273 views

Raspberry pi pico W - code don't run when battery powered

I've a Raspberry pi pico W and I the following code works with Thonny IDE but not when battery powered. The pico work with my battery because a simple code which turn on and off the pico led works ...
Ant001ne's user avatar
-1 votes
1 answer
2k views

ModuleNotFoundError: No module named 'digitalio' HELP

I have been following a YouTube tutorial on how to setup the Raspberry Pi Pico H as a midi device. While programming, I came accross an error ModuleNotFoundError: No module named 'digitalio'. I'm ...
Pixel's user avatar
  • 1
-1 votes
1 answer
282 views

Raspberry pi Pico GPIO not working and firmware querry

I just bought 2 new raspberry pi pico units, but I am struggling with them. I ran a few basic commands in Thonny's shell and maid a program to have the onboard LED blink. Everything is working fine ...
Coder's user avatar
  • 19
-1 votes
2 answers
767 views

I cant connect my Raspberry Pi Pico

So I'm trying to connect my Raspberry Pi Pico to Thonny but I doesn't let me select com4 or anything else except "try to detect port automatically" and when I put it, it does not let me run ...
PythonKid's user avatar