Questions tagged [micropython]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 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
32 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
34 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
64 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
68 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
133 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
113 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
0 votes
0 answers
145 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
185 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
114 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
175 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
69 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
83 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
15 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
35 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
128 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
27 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
51 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
  • 11
0 votes
1 answer
49 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
493 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
236 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
1 answer
2k 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
707 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
82 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
136 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
  • 11
0 votes
1 answer
509 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
391 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
2k 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
401 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
278 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
374 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
157 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
1 answer
1k 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
-1 votes
2 answers
503 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
3 votes
1 answer
756 views

Raspberry PI Pico W temperature reading

I have been playing with my newly acquired Raspberry Pi Pico W and reading the temperature. How much variation between the internal temperature sensor and an external TMP36 wired up to ADC2 should I ...
Alastair Montgomery's user avatar
1 vote
2 answers
321 views

nrf24l01 not Working with Raspberry Pi Pico W

I can use the nrf24l01 wireless module just fine with a Raspberry Pi Pico, but when I try to compile the same code on the Raspberry Pi Pico W, it fails to recognize the device. I am using this library,...
Marin's user avatar
  • 111
0 votes
0 answers
130 views

Raspberry Pi Pico W exits out of main.py when microcontroller is moving

I am using a Raspberry Pi Pico W to generate basic control algorithms to a home made drone. Calibration for gyro and motors and manual inputs for the motors all work through HTML interface. Once we ...
Seema Drone's user avatar
0 votes
1 answer
920 views

How can Rpi Pico W control a GPIO pin connected, I2C digital MEMS microphone?

Using the Raspberry Pico Pi, how can micropython be used to get the values from a MEMS microphone such as the Adafruit Silicon MEMS Microphone Breakout - SPW2430 link to ada fruit Product ID: 2716. ...
Vass's user avatar
  • 133
1 vote
1 answer
238 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
237 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
1 answer
466 views

Can't connect to Raspberry Pi Pico

I am trying to connect to an Raspberry Pi Pico from an Raspberry Pi 3B+ running Raspian Bullseye. The Pico shows up in the File Manager when I connect with the BOOTSEL button pressed. When I try to ...
Edward Mansfield's user avatar
1 vote
0 answers
352 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
0 votes
1 answer
211 views

How to send data between two already configured HC-05 modules

I'm new to electronics and microcontrollers, and I'm building an small project in which I'd like to send information from a master HC-05 bluetooth module to an slave one, I've already synced them ...
Rodolfo BocaneGra's user avatar
1 vote
0 answers
111 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
2 votes
1 answer
1k views

DS18B20 OneWire Library with Raspberry Pi Pico W and Micropython

Good day, I am using a Raspberry Pi Pico W with a temperature sensor among other things. I tried finding code online to make the temperature sensor work and it returns the following error. Found DS ...
Pranav's user avatar
  • 23
0 votes
1 answer
652 views

Why am I getting this syntax error in micropython?

I am testing the raspberry pi pico, and am getting a strange syntax error. I have no idea why. from time import sleep led = Pin(25, Pin.OUT) wait = 0.1 while True for x in range(9) wait += ...
Sad Man's user avatar
1 vote
1 answer
263 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
  • 141
1 vote
1 answer
1k views

How can I connect my Raspberry Pi Pico W to an Eduroam WiFi access point (WPA authentication)?

For a teaching demo about autonomy in scientific research, it will likely be a major blocker if students cannot connect the Pico W to their school's WiFi. Someone suggested MAC spoofing, and I agree ...
Sterling's user avatar
  • 111
1 vote
0 answers
447 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
0 votes
0 answers
52 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