Questions tagged [micropython]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
36 views

Pico: GPIO pin need to be high at power up to ensure correct behaviour against connected 8-bit computer

I am experimenting with creating a replacement for the 8048-based keyboard for an old 8-bit Z80 computer over a parallel port, where the value is read when a strobe pin goes from high to low. I have ...
Thorbjørn Ravn Andersen's user avatar
0 votes
0 answers
18 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
2 answers
50 views

Have Pico turn lights on at sunset and turn off at 2am next morning

I am still new, but trying to learn. i have been piecing this together, and i'm not getting anywhere. i hope this can be done easier then what i have. the end goal is have the pico get the current ...
AmongTheShadows's user avatar
0 votes
1 answer
26 views

Micropython install RPi.GPIO issue for Pico W

I'm trying to install the RPi.GPIO package on my Raspberry Pi Pico W, but when I run import mip mip.install('RPi.GPIO') I get the message back Installing RPi.GPIO (latest) from https://micropython....
Hale Tussing's user avatar
0 votes
1 answer
46 views

Communication between two RP2040 devices with micropython

I have two RP2040 devices, one a Raspberry Pi Pico W(H), and one a Waveshare RP2040 LCD 1.28 device. I am trying to send data from the Waveshare to the Pico through a USB cable (USB-C on the ...
Andrew Stacey'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
2 answers
19 views

Pico W I2C timeout occurs when using multiple sensors on a single bus

I am using to VL53 lidar sensor chips on a single I2C bus. This specific chip does not have an option to change I2C address through hardware and so I must do it through software. This works and I am ...
Joe Moore's user avatar
  • 181
0 votes
0 answers
44 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
24 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
37 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
1 answer
107 views

How should I go about making a serial to ethernet server on a Pico varient?

I am trying to make a serial to ethernet server, similar to a regular pi board and ser2net, using a pico variant. I am using a Waveshare RP2040-ETH Mini Development Board, but there is very little out ...
Michael H.'s user avatar
0 votes
0 answers
37 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
1 vote
1 answer
59 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
0 votes
0 answers
12 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
78 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
-1 votes
2 answers
116 views

Pico W Push Button not turning on the onboard LED

I am completely new to microcontroller in general and I am following along the kitronik discovery booklet. I have the circuit below built on my breadboard. When I run this circuit on wokwi.com it ...
Teddy's user avatar
  • 101
0 votes
0 answers
92 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
90 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
1 answer
133 views

Where does Pico micropython print go with main.py?

If you load a main.py file onto the Pico with micropython firmware running, it will run on startup. I can tell that this is working because I observe GPIO outputs changing, etc. However, I'm not sure ...
alex's user avatar
  • 21
0 votes
1 answer
185 views

How to use PIO one bit shift to FIFO on Pico in micropython?

I'm trying to port the Pico C/C++ SDK example on PIO FIFOs into micropython. I'm unable to get the out() instruction to work as intended. I've tested the generic micropython pio_blink.py sample, ...
Dan's user avatar
  • 101
0 votes
0 answers
158 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
2 votes
2 answers
244 views

Cannot use global variable in pio function

I am working on a project in which I need to control a brushless motor with a microcontroller. I have chosen the Pico as I already have some on hand and there is a high chance of it being completely ...
lpinfinity's user avatar
2 votes
1 answer
299 views

How to create open network for Raspberry Pi Pico using micropython?

I seem so close to getting it working but every route I take just doesn't seem to work. I'm trying to make an access point from my Raspberry Pi Pico with no password. SOUNDS SIMPLE DOESN'T IT. Here's ...
Josh_heritage's user avatar
1 vote
0 answers
457 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
0 votes
1 answer
451 views

Invalid pin error Raspberry Pi Pico micropython

I'm currently doing a project using all of the GPIO pins on the raspberry pi pico. I want to configure pins 31, 32 and 34 (GP26, 27 and 28) as outputs but keep getting the 'invalid pin' error. No idea ...
lia12's user avatar
  • 1
0 votes
1 answer
214 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
401 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
1 vote
0 answers
98 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
0 votes
0 answers
106 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
19 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
1 answer
117 views

Using Electret Microphones with Raspberry Pi Pico

I am looking to have the ability to store/analyze audio using a Raspberry Pi Pico. I have found that electret microphones are a good option, since it only requires an ADC, which is already built-in to ...
Gabe Morris's user avatar
-1 votes
1 answer
244 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
0 votes
0 answers
35 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
76 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
  • 9
0 votes
1 answer
74 views

Mecanum Robot for Pico

I'm trying to build the Keyestudio mecanum 4WD car for pico for a summer camp I run for high schoolers. I have no programming knowledge or background, and neither do the kids. I've been following the ...
Joanna Gannon's user avatar
0 votes
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
  • 1
0 votes
0 answers
410 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
2 votes
2 answers
4k views

How can one make MicroPython HTTPS REST API requests on Pico W?

I'm unable to make MicroPython REST API requests from the Pico W. The WLAN connection is working but the API call fails. ► API call| Not working - Wokwi Pico W Simulator # Import modules import ...
Ayan Mullick's user avatar
0 votes
1 answer
1k 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
0 votes
0 answers
119 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
-1 votes
1 answer
253 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
  • 9
0 votes
1 answer
756 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
1 vote
0 answers
518 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
3 votes
2 answers
3k views

Using micropython on Raspberry Pi Zero W

I have found a library and sample code that seems to work very well on the Pico W, but I need a bit more power, so I'd like to use the same library on the Pi Zero W instead. Initially, I tried using ...
G.H.'s user avatar
  • 151
1 vote
1 answer
537 views

umqtt.simple returning Error: [Errno 103] ECONNABORTED when publishing to mosquitto broker on windows 10 [closed]

My problem: When attempting to send sensor data from Pico W using umqtt.simple to a Windows machine on my network running mosquitto, I can connect to the network but not to the mosquitto broker. I ...
Phillip's user avatar
  • 19
2 votes
0 answers
337 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
1 vote
0 answers
468 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
214 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
0 votes
2 answers
2k views

Useful statistics from Pi Pico

Apart from reading the internal temperature sensor and frequency, is there any other useful information you can query on the Pico board using Micropython? For example, memory or flash usage, CPU usage ...
Alastair Montgomery's user avatar