r/raspberrypipico 4h ago

help-request Can't turn on an LED

0 Upvotes
GPIO on GP0; Ground on Pin 18

For some reason that does not make sense in my small peanut brain, I cannot get a button to turn on when in series with a button and my GPIO pin. The moment the LED is removed from the series everything works as it should and my logs are fine, but the moment it is inserted the GPIO pin no longer sees a low power state to output a value of "0". If someone could tell me why my head is full of pebbles that would be amazing.

Code for reference:

from machine import Pin
import time

button = Pin(0, Pin.IN, Pin.PULL_DOWN)

while True:

    print(button.value())

    time.sleep(0.1)Code for reference:from machine import Pin
import time

button = Pin(0, Pin.IN, Pin.PULL_DOWN)

while True:

    print(button.value())

    time.sleep(0.1)

Edit:

I found the solution thanks to you all pointing out my rookie mistakes. There was still the issue of the LED not letting the GPIO pin being able to read properly.

My solution was to change the pin to be an OUT and PULL_UP. With that I tied the button to the 3V3 pin on one side and the other to my GPIO pin. On the same rail with the jumper leading to the GPIO I also added the LED and resistor, essentially creating a parallel circuit letting the GPIO read the proper voltage while the LED received the same.

Most likely the cause of my problems was the GPIO not sensing the correct voltages regardless of LED state. This current divider seems to have fixed it though. Below is the project that I have this apart of, it's the logic for a Nixie clock that I am building and coding from scratch. If anyone would like to see that let me know and I can make a post about it

My Nixie Logic Circuit with the LED properly installed

r/raspberrypipico 14h ago

Use pi pico as sound controller?

Post image
6 Upvotes

I was wondering if this pcb can be replaced or enhanced with a pi pico to play custom sound files. The pcb is from a white noise machine and connected to speaker and time potentiometers. Unfortunately I don't know what I'm doing. Any support is highly appreciated.


r/raspberrypipico 6h ago

Pico W Bluetooth midi in Arduino IDE

1 Upvotes

Hio. Anyone got any examples or experience getting midi over Bluetooth working with the pico W in the Arduino environment?

Regular Bluetooth serial works well, but I can't find any examples of Bluetooth midi. Thanks!


r/raspberrypipico 12h ago

help-request Pico project ideas for a nerd?

3 Upvotes

I'm a nerd who loves Warhammer 40k, and I just got a pico as a gift, and I'm excited for it's capabilities! I'm not sure what it can do yet, but I just wanted to see if anyone had any Warhammer/hobby centric ideas for it. Thanks!


r/raspberrypipico 12h ago

Can the rp2350 communicate with a pc using PCIe?

3 Upvotes

r/raspberrypipico 7h ago

Trekko Pico GPS Logger

Post image
1 Upvotes

Has anyone used or worked with this kit? I have one and I cannot find code that works with all of the components as I assume they were assembled for. Maybe I am just a goof too.

I want to use the device to record NMEA sentences to the SD card. Push the included button to start, and push it again to stop.

The sample codes are for basic function of the individual components: SD Demo, Neopixel Demo, GPS Demo.

I'm not a coder, I just want the thing to record NMEA Sentences to the SD card. I thought it would work out of the box.

I don't want a tracker and I don't want to use a phone. I like the form and efficiency of this hardware. I think SB did this right but there's no code that I could find that's pre written.

Any ideas? TIA

I've done the ESP32 build. I like this hardware better.


r/raspberrypipico 13h ago

Is uploading LittleFS Data via OTA possible?

3 Upvotes

Title kinda explains the question but as a bit more context

I have gotten my pi pico to update its code through ArduinoOTA, so I can push software updates to them when they are in physically hard to reach places.

However my sketch uses a bunch of JSON files stored using LittleFS which contains a bunch of config settings which are unique per pi pico and dont want hardcoded into the main sketch. Is there a way I can update these config files in LittleFS remotely similar to how I can update the sketch using OTA?


r/raspberrypipico 16h ago

Help a new user get started.

4 Upvotes

I've been researching the raspberry pi scene for a few years now and decided that with 20$ to blow now would be the time to try to get hands on with one myself. I was looking at a raspberry pi pico W as I was gonna attempt to make a few projects with it for multimedia streaming and maybe some home automation, however I could find a pico W for around 14$ on amazon I couldn't find a kit with a breadboard, lcd screen and lidar sensor within price range (a little less than 10$). If you guys know of any alternatives I am all ears as I was eager to attempt a few projects. If I had more money to blow I'd happily buy a Pico W starter kit that just includes everything but that was a bit out of the price range (i believe 30 was the lowest price i could find for something that works). Please reddit do your magic as I'd love to use this as an excuse to learn micropython and touch up on old c++ knowledge.

Edit: Would it be "better" to start with something like this and just buy a pico W after a few months when I have the money to spare, or is there some addon wifi card that could be added for cheaper to give the option of wifi/bluetooth? I'd still like the option to communicate with it wirelessly to do a few automation tasks i.e. create a movement sensor with a camera to detect movement, snap about 15-20 pictures and send them back to a web server, or creating mood lighting based on the current active task on my computer.


r/raspberrypipico 12h ago

Is it possible to turn Pico 2 W into the debug probe?

2 Upvotes

Yes, I know that it is possible for Pico 2 but I've never saw any mentions of the version with wireless chip. I know that they are different even in the basic LED wiring. So I'm not sure that it will work for the debug probe. Anyone tried?


r/raspberrypipico 11h ago

Is this feasible?

1 Upvotes

Do you think it would be possible to simulate a gba cartridge using an rp2040 as the central controller?


r/raspberrypipico 1d ago

Raspberry Pi Pico 2 W : Web WorkFlow Working

4 Upvotes

Hello Team, I have managed to have Pico 2W running Circuit Python 9.2.7 run Web WorkFlow and can connect to it remotely


r/raspberrypipico 2d ago

¿Cómo puedo agregar una biblioteca externa en un proyecto de Raspberry Pi Pico en C++ usando CMake?

0 Upvotes

: Hola a todos, estoy trabajando con un proyecto en C++ para la Raspberry Pi Pico usando el SDK oficial. Quiero agregar una biblioteca externa (en este caso, una para controlar una pantalla OLED SSD1306), pero no he podido integrarla correctamente.

Mi estructura de carpetas se ve así:

objectivecCopiarEditarmi_proyecto/
├── CMakeLists.txt
├── main.cpp
├── ssd1306/
│   ├── CMakeLists.txt
│   └── ssd1306.cpp
│   └── ssd1306.h

Ya copié el archivo pico_sdk_import.cmake al proyecto y tengo definido el PICO_SDK_PATH correctamente, pero al compilar me lanza errores como que no encuentra el pico_sdk_import.cmake o que hay errores en la inclusión de la biblioteca.

Mis preguntas son:

  1. ¿Cómo se debe estructurar correctamente el CMakeLists.txt principal y el de la carpeta ssd1306/ para que reconozca la biblioteca?
  2. ¿Es necesario hacer algo especial con target_link_libraries() o add_subdirectory()?
  3. ¿Algún ejemplo concreto que funcione bien para usar una biblioteca externa en C++ con el SDK de Pico?

Agradecería muchísimo si alguien pudiera compartir un ejemplo funcional o alguna guía paso a paso, ya que la documentación oficial no es muy clara con esto.

¡Gracias de antemano!


r/raspberrypipico 3d ago

Coin-sized nuclear 3V battery with 50-year lifespan enters mass production

57 Upvotes

r/raspberrypipico 3d ago

Bike Camera With Arducam & Lidar

2 Upvotes

Several years ago, I was riding my bike and being rather inattentive. The result was a very painful collision with the back of a flatbed trailer that was loaded with concrete forms and parked on the side of the road. I know that the real answer is to pay better attention but, being who I am, the experience has caused me to think about a build project off and on.

I want to build a camera that can be mounted on my handlebars that can provide collision alert and trigger recording when an object is within close proximity (say 5 metres). I'm not interested bin having a continuous video stream but I do want a faster sequence of high quality frames during a detection event. I've looked at the pi zero and pi cam but am not happy about the power requirements. I've also looked at the Pico and arducam but would have to increase storage to buffer image. Also a single camera would make range measurements more difficult. I hit upon an idea this morning while browsing at Sparkfun and would like this community's ideas on feasibility.

My idea is to basically combine a Pico, an arducam, and an infrared led based lidar sensor that is frequently making distance measurements (say 1/4 seconds). I would also control the arducam to take still frames at lower resolution once a second or perhaps at longer intervals. When the lidar sensor picks up an object within the distance limit, the unit woul speed up the frame rate and video quality and stream the images and data to an SD card. The basic idea is to document the circumstances around a possible accident.

So, here is my question. With the proposed components (Pico, arducam, & lidar) be able to work together to produce a relatively light weight and power efficient device or am I chasing a red herring?


r/raspberrypipico 4d ago

help-request Lidar with pico W connection question

2 Upvotes

Hello everyone, I am hoping if any of you guys can help me out with a problem am having, with making a Garmin Lidar lite v4 and sparkfun RFM69 board to work with pico W on Thonny IDE while using micro Python. I couldn't find any library or an example that will help me achieve my goal. So if any of you have any suggestions or sources to look up too, it will be greatly appreciated. Comment or dm me if an clarification needed.


r/raspberrypipico 4d ago

help-request How to read WL_GPIO2 in Arduino IDE using a Pico W

Post image
3 Upvotes

Hi there,

I want to determine if there is voltage present on Vbus or not. Using the regular Pico I was able to read one of the pins, however on the Pico W, it seems its connected to a GPIO on the wifi module. How would I go about reading that pin in Arduino?

Thanks!


r/raspberrypipico 4d ago

Dual Retro Game 3: PICO&Circuitpython Game

Thumbnail
youtube.com
5 Upvotes

r/raspberrypipico 4d ago

i2C 5v device logic with pico

2 Upvotes

Hello a bit new to this but from what I understand the pico uses 3.3v logic, and you should use i2c devices that use 3.3v logic (don't know how to find this out) and 3.3v for power, I have a air quality sensor I think a bme240 (I'll add the link in the comments), that needs 5v power, but communicates over i2c, I can't figure out if this will work or kill one or both of the boards.

Any last suggests before I just wire it up and hope for the best?


r/raspberrypipico 5d ago

uPython [PROJECT] I made a retro music player for the Pi Pico because my inner 12-year-old demanded it

26 Upvotes

So...I did a thing. 😅

I was supposed to be doing something useful last night, but somehow I ended up making a multi-channel 8-bit style chip music player for the Raspberry Pi Pico instead. Because obviously, what the world needs now is more bleeps and bloops.

👾 Written in MicroPython\ 🎵 4 square wave channels (using PWM)\ 🥁 1 NES-style percussion channel (using an ugly StateMachine hack)\ 🧠 Runs async on the second core (Perfect for if you've made a game and want to add some retro music)\ 💾 Tracker-inspired pattern format

I grew up in the glorious 80s, raised on a steady diet of C64 SID magic and NES soundtracks. Later graduated to Amiga, where I spent way too many hours messing with Sound Tracker and it's successors.

Fast-forward a few decades: I wanted to recreate that retro music vibe using just a Pico, some resistors, and pure nostalgia. The result? A surprisingly decent little 8-bit music engine you can drop into your retro games or just use to annoy your partner with PWM screeches.

How it works:

Each sound channel gets its own GPIO pin.

Pins are mixed through resistors straight to a speaker (no amp! just vibes!)

You can play music asynchronously on the second core in the background (perfect for during gameplay) or synchronously (think showing the Game Over screen until the music is over).

Pattern format is inspired by trackers. Notation is like C-404 to play a middle C quarter note.

Repo, example, and very simple wiring instructions (only a speaker and 5 resistors needed) can be found on GitHub.

Let me know if you try it out! I’d love to hear what kind of chip bangers you manage to squeeze out of it.

Video: https://www.youtube.com/watch?v=WPHurmAEvoE\ Repo: https://github.com/mannbro/PiPico_8-bit_ChipSound_Tracker_Async_MusicPlayer


r/raspberrypipico 5d ago

Sending MIDI signals via unpowered USB

3 Upvotes

What I want is to create a MIDI controller for my Boss Katana guitar amp, I initially started with arduino nano but soon I found out that's not capable sending MIDI signal via USB (without an usb shield), so I decided to use a pi pico.

I wrote a simple code (using circuitpython) to use pi pico as an usb host to send midi signals to my pc (tried with fl studio) and worked. But my problem is that the Boss Katana does not provide power via its usb port, so I cannot use the pico's built in usb port.

I also researched that I can hook a dc power jack to the board via vbus or vsys but my concert is that it can potentially fry the board if I plug both usb (for pogramming) and dc jack.

Can you suggest any ideas how to make this work? Can I add another usb port to get power from or send the midi data?

I'm not bound to circuitpython, although I have limited experience with C/C++.

https://github.com/sekigon-gonnoc/Pico-PIO-USB I also found this lib but wasn't able to make it work.

Thanks!


r/raspberrypipico 6d ago

Raspberry pi pico 2 w not working, no led nor boot or bootsel drive

2 Upvotes

I've tried 3 different cables on my new Pico 2 Ws. I have 2 of them from Adafruit, yet they neither indicate with their LED nor show that they are connected via Windows. It seems like they may or may not be faulty. I want to diagnose them and see if it's a cable issue for certain or if my boards are just defective

Edit: I found the cable that did data; I had lost it between a cabinet and forgot about it. Thankfully, now they connect to Windows, and I believe I can use them now. Thanks for the help and the questions. I appreciate it.


r/raspberrypipico 8d ago

uPython WS2812 RGB strip Rainbow transition / scrolling script

3 Upvotes

I created a script for controlling the RGB strip I placed on the back of my desk. Originally this was controlled via a pi zero 2W but that felt really wasteful, so I bought a pi pico.

However, none of the scripts I saw controlled the strip the way the old script did. So, I used a script that was sort of close and my original one and essentially merged them together. Now, I have a script that is functionally the same as the old one but works great on the pi. The rainbow scroll effect I have is very similar to the old AOSP Ice Cream Sandwich default background.

Github Repo: https://github.com/aceoyame/WS2812_LEDStrip_SmoothRainbow

Note: I have it set to use GPIO 0 for the data line and have my 84 LEDs set as the number of LEDs already. You will need to adjust those if your strip is different.

Note2: This is a fairly slow scroll so it may not look immediately look like it is doing anything. You can adjust the speed and brightness at the bottom rainbow_cycle area portion of the script.


r/raspberrypipico 8d ago

help-request Prevent auto running main.py when connected to usb

0 Upvotes

Hello everyone! I'm trying to run code on my raspberry pi pico automatically when plugged in through the 3v3 and gnd pins, but I want to be able to actually code the pico when i plug it into the usb to vscode. When i try to do that though, the pico just bootloops like vscode and the raspberry pi are fighting about whether it'll connect or auto run main.py. Is there a way to programatically detect when the power is coming from usb over the 3v3 pin?


r/raspberrypipico 9d ago

Not Pi Pico but KB2040. Help with wiring to I2C LCD

0 Upvotes

Edit: All of your comments were very helpful. Thank you

Im confused as to which pins I should connect the SDA and SCL pins to for an I2C LCD to a KB2040. Im not looking for someone to give me the pinout because I tried and I dont understand it well. Google only provides me with Pi Pico stuff when thats not what I need. Also any help would be appreciated as to how I would code the lcd using arduino IDE as it is compatible with the KB2040. Thanks


r/raspberrypipico 9d ago

Pimoroni Plasma Pi Pico and WLED

1 Upvotes

Does anyone know if WLED can be flashed onto the Pimoroni Plasma RP2035? It's supposed to be a Pi Pico 2 board, and I'm new to all of this, and I was looking for an easier way to control LED strings other than microPython.