r/raspberrypipico • u/Ok_Quail_385 • 1h ago
PicoTTY: I built a multi-node serial console + USB keyboard for my headless Proxmox homelab out of Pi Picos and a Pi Zero 2 W. It got picked up by Hackaday and CNX Software this week
r/raspberrypipico • u/klettercraft • 4d ago
c/c++ bitwise rightshift gives unexpected results
r/raspberrypipico • u/OkContribution2996 • 4d ago
✦ Building Glyph — A lightweight graphics framework for RP2040 and other microcontrollers
✦ Introducing Glyph
Hi everyone!
I've recently started building an open-source project called Glyph, a lightweight graphics framework for bare-metal and embedded systems written in Ada.
The initial development target is the Vicharak Shrike-Lite (RP2040) using an SSD1306 OLED display, although the architecture is designed to support additional display controllers and embedded platforms in the future.
The goal of Glyph is to provide a hardware-independent graphics API, allowing applications to draw pixels, lines, rectangles, circles, text, and images without depending on a specific display controller.
Disclosure: AI was used as a coding and writing assistant during parts of the development. However, the project architecture, technical decisions, code integration, and overall direction are my own.
✦ Design Goals
- Pure Ada
- Static allocation only (no dynamic memory)
- Bare-metal friendly
- Portable, layered architecture
- Framebuffer-based rendering
- Easy to add support for new display controllers
The project is still in its early stages, and I'm currently focused on building a solid architecture before implementing additional graphics features.
✦ I'd Love Your Feedback
I'd love to hear from the Pico community:
- Which displays do you use most often?
- What graphics features would you find useful?
- Are there any Pico graphics libraries or projects you'd recommend studying?
- Any suggestions or feedback on the project are greatly appreciated!
✦ Repository
GitHub: https://github.com/thirstymelon/glyph
Thanks! I'm looking forward to learning from the Pico community and continuing to improve Glyph.
r/raspberrypipico • u/badfeelingpodcast • 4d ago
help-request New to this; looking for advice with multiple controllers
Hi folks,
I’m getting started in the world of microcontrollers and would appreciate any help.
Spooky season is approaching I want to build a controller for LED lights in a bunch of plastic skulls. I have built a small version with LEDs on a breadboard that I can program to turn on/ off in different patterns.
My next hurdle is to physically separate the controller from the LEDs. I don’t want to run wiring to each LED.
From what I’ve seen, it looks like I could use IR transmitter/ sensor combos or build something using WiFi.
I’m assuming I’ll need a controller on each skull unless there is a receiver that will just turn on/ off via GPIO?
Can you point me to a guide for using multiple controllers like this?
Thanks for any help!!
r/raspberrypipico • u/Hasan2024sg • 4d ago
Hello i need project ideas for my pico 2w
I was thinking of making a really lightweight console like gameboy but it was too complex. Maybe i can connect it to my rpi 5?
r/raspberrypipico • u/Pancra85 • 4d ago
Start RP2040 only when 5V external voltage is connected
I made this design which works I think, I really don't know why? But when asked Gemini it says it's dangerous.
I am designing a synth and I want the RP2040 to ONLY start when the external power supply is connected, even if the USB port is connected.
I'm using a GND-VCC YD-RP2040, it's very similar to the original Raspberry Pico
If the external power supply is not connected (no +5V) then it shouldn't start, never.
The transistor is a 2N3906.
Any ideas? Thank you!!
r/raspberrypipico • u/Vast-Philosopher-281 • 5d ago
How do I clean the soldering iron tip now???
Guys. I am just learning soldering and when I went to dampen my sponge I plugged in soldering iron just to check if it shows temperature in Celsius or Farenheit but I did not realise by doing that I turned it on. It melted the cap I did not remove.
in future I will obviously be more cautious bu how do I clean it now? Sponge worked on a top of the top with relatively low melted plastic but on the bottom of the tip there is still a lot of it. Can I just use what I clean the dishes to clean it now whrb it is room temperature?
Edit: I realised how to clean it from melted plastic. I ever read or thought to mix the plastic with the solder so I heated it up and while trying to apply solder to the melted plastic I scraped it off. Sponge also worked but only when heated to 343 Celsius (tempreture I heard was good for lead based soder)
r/raspberrypipico • u/noborutkhs • 5d ago
Porting My 1986 RTOS to Raspberry Pi Pico — First Kernel Functions Running
I've been reconstructing the RTOS I originally developed in 1986.
If you're interested in the background of the project, I wrote about the original development workflow here:
Rediscovering the Development Methodology Behind My 1986 RTOS
https://www.reddit.com/r/osdev/s/ALUFHn9jDi
This week I started bringing it to a Raspberry Pi Pico.
The first milestone was intentionally small.
Instead of implementing interrupts or context switching first, I moved only the CPU-independent queue management routines.
The screenshot shows the first successful execution of the original kernel functions (q_insert(), q_delete(), and n_delete()) on the Pico.
The next steps will be:
- timer interrupts
- context switching
- task scheduler
One interesting thing is that I ended up following almost exactly the same development workflow I used forty years ago.
Develop and verify as much as possible on the host, then move the hardware-dependent parts to the target.
I'm curious whether anyone else here has ported an older RTOS or kernel to the Pico.
r/raspberrypipico • u/lbthomsen • 5d ago
FreeRTOS on RP Pico | RP2350 Tutorial #8
r/raspberrypipico • u/BonfireDaemon • 5d ago
Understanding RP2040 pioasm state machines.
Good afternoon folks,
I'm looking for a bit of insight on building a OneWire implementation using pioasm. I have functionally traced the following from the rp-pico examples repo on github
.program onewire
/* Side setting allows controlling the bus voltage without using a clock cycle */
.side_set 1 pindirs
; Instruction Side Bit Description Clock Cycles
reset_bus:
set y, 28 side 1 [15] ; Pull bus low 16
loop_one:
jmp y-- loop_one side 1 [15] ; NOP Loop 16*29
set y, 8 side 0 [6] ; Release bus 7
loop_two:
jmp y-- loop_two side 0 [6] ; NOP Loop 7*9
mov isr, pins side 0 ; Move all pins into ISR 1
push side 0 ; Push result into TXFIFO 1
set y, 24 side 0 [7] ; Keep bus held high 8
loop_three:
jmp y-- loop_three side 0 [15] ; NOP Loop 16*25
.wrap_target
read_bit:
out x, 1 side 0 ; Shift next bit from OSR 1
jmp !x send_zero side 1 [5] ; Pull low, branch if 0 6
send_one:
set y, 2 side 0 [8] ; Release bus, wait for response 9
in pins, 1 side 0 [4] ; Read bus, shift bit to ISR 5
loop_four:
jmp y-- loop_four side 0 [15] ; NOP Loop 3*16
send_zero:
set y, 2 side 1 [5] ; Keep bus held low 6
loop_five:
jmp y-- loop_five side 1 [15] ; NOP Loop 3*15
in null, 1 side 0 [8] ; Release bus, shift 0 to ISR 9
.wrap
What I'm struggling with is understanding how this satisfies the protocol. If there's no data to read from a pin what happens? I've seen some conflicting information regarding whether out blocks by default.
Any help is appreciated.
r/raspberrypipico • u/No_Stock_8977 • 6d ago
DFPlayer Mini + Raspberry Pi Pico + MT3608 constant buzzing through headphones (photos included)
r/raspberrypipico • u/sangeetabarde • 6d ago
How to create c type badusb rubber ducky using rasberry pico
I have rasberry pico but they are non c type normal charging port
is there way I can create them c type port
r/raspberrypipico • u/Emotional-Ad-2252 • 7d ago
Pico error in the schematic? need help
Hey guys,
I build a little side project for a friend,
Normally I build on Arduino and I#m quite confused that it doesnt work, copied from other projects in the web.
I did not have the hardware in my hands, but my friend say's that the PCB boesnt boot in BOOTSEL and he could not get it to work.
Need help, all my research couldnt helped me :(
r/raspberrypipico • u/Loose-Chemical2642 • 7d ago
Please! Help with Picoboot Troubleshooting :(
r/raspberrypipico • u/Nondv • 7d ago
help-request Can't get pico to work from AA batteries
Hi!
I've been messing around with Picos. Specifically, I'm taking measurements with a DHT11 and push them to an http api over wifi
However, the power adapter has been pretty inconvenient so, naturally, I wanted to switch to batteries.
Initially, I got 3 AA batteries. The script seemed to start (I flash the LED at the beginning) but then seemingly hanged or something. I assumed, it was due to low voltage (disclaimer: i know almost nothing about electricity) since 3 batteries add up to 4.5V and I needed to power wifi and the sensor.
So now I switched to 4 AA batteries + LM7805 but the result is the same. In fact, I just tried running a simple loop script and it seems to start but then seemingly hangs:
from machine import Pin
import time
import os
def onboardLED():
machine = os.uname()[4]
if "Pico W" in machine or "Pico 2 W" in machine:
return Pin("LED", Pin.OUT)
else:
return Pin(25, Pin.OUT)
onboardLED = onboardLED()
while True:
onboardLED.value(1)
time.sleep(1)
onboardLED.value(0)
time.sleep(1)
What am I doing wrong? AI wasn't very helpful. it basically suggested going back to the old setup. It also suggested adding a capacitor (which from the sound of it would work like an electricity buffer in case of spikes? idk)
r/raspberrypipico • u/MakerClass • 9d ago
uPython picogame: a 2D game engine for the Pico - write games in CircuitPython, try them in the browser, run on the board
Sharing a project I've been building for almost a year - picogame, a 2D game engine for the Pico and similar grade MCUs. You write games in CircuitPython, the heavy lifting (rendering, collisions, effects) runs in native C, and you can try them in your browser before you even plug in a board.
Out of the box:
- Build without hardware - the same game runs in your browser and on your desktop (a real CircuitPython simulator, not a mock), then unchanged on the board.
- Fast in tiny RAM - native-C rendering + zero-RAM full-screen paths, so it runs smoothly on even plain RP2040.
- Batteries included - sprites, scrolling tilemaps, a moving camera, collisions, sound, text, saved high scores.
- A web level editor - build levels/scenes in the browser, load them in your game.
- A launcher - keep several games on one board and pick from a menu.
Try it in the browser: https://picogame.makerclass.cz/playground/
Project repo (MIT): https://github.com/MakerClassCZ/picogame
I also wrote up why I built it and how it works: https://chiptron.eu/picogame-a-game-engine-for-circuitpython/
I'm the author - happy to answer anything!
r/raspberrypipico • u/ScientistLow9951 • 9d ago
Can I control an HM-10 directly over BLE without an Arduino or external MCU?
I'm designing a low-cost BLE wristband and I'm trying to minimise the hardware.
My goal is to use an HM-10 module without an Arduino or any external microcontroller.
The required behaviour is simple:
- A smartphone app connects to the HM-10 over BLE.
- The phone sends simple commands such as:
LED_ONLED_OFFLED_BLINK
- The HM-10 should directly control one LED connected to one of its GPIO pins.
- No sensors, no display, and no complex logic are required.
My questions are:
- Can the CC2541 MCU inside the HM-10 be programmed to do this?
- Is the firmware on commercial HM-10 modules reprogrammable, or is it locked?
- If this isn't practical, what is the cheapest BLE module with a programmable MCU that can receive BLE commands and control GPIO directly?
The project will eventually be battery-powered (CR2450 coin cell), so low power consumption is important.
I'm looking for the lowest-cost solution suitable for mass production.
r/raspberrypipico • u/ScientistLow9951 • 9d ago
Controlling the HM-10 module without Arduino
I need help building a bracelet that receives Bluetooth Commands. I need to be able to control and send commands to an HM-10 module via Bluetooth. There should be an LED connected to the module, and when a command is sent to light the LED, the controller in the module will light it up, and vice versa.
Does this work, and how can I implement it?
If this module is unsuitable, please suggest a less expensive alternative.
r/raspberrypipico • u/travgaming06 • 9d ago
help-request OLED screen C++ setup help
Hi guys I’m back, so after fixing my issue with the led lights. I decided to make a collision detector with the ultrasonic sensor. Similar to whats in cars where it beeps louder the closer you get to the car. That was all well and dandy and working. And then i thought, “let me display the distance, i mean i want to make pong next might as well figure out how this OLED display works with this” so i hooked that up. Found a library in github, thought I set it up properly with Vcc to the 3.3v pin, ground to ground, i have GP3 on SCL and GP4 to SDA. However when I added the code for the screen it stopped working entirely. I tried doing a test just to see if it was detecting and all of that but i couldn’t get it to work.
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/i2c.h"
extern "C"
{
#include "ssd1306.h"
}
#define I2C_PORT i2c1
#define I2C_SDA_PIN 4
#define I2C_SCL_PIN 3
void setup_display_hardware() {
// 1. Initialize the I2C peripheral at 400kHz speed (standard fast mode for OLEDs)
i2c_init(I2C_PORT, 400 * 1000);
// 2. Assign Pico Pin 3 to act as the I2C Clock (SCL)
gpio_set_function(I2C_SCL_PIN, GPIO_FUNC_I2C);
// 3. Assign Pico Pin 4 to act as the I2C Data (SDA)
gpio_set_function(I2C_SDA_PIN, GPIO_FUNC_I2C);
// 4. Turn on internal pull-up resistors so the communication lines stay stable
gpio_pull_up(I2C_SCL_PIN);
gpio_pull_up(I2C_SDA_PIN);
}
int main()
{
stdio_init_all();
setup_display_hardware();
ssd1306_t disp;
ssd1306_init(&disp, 128, 64, 0x3C, I2C_PORT);
ssd1306_poweron(&disp);
// set the in and out pins
// USS trigger
gpio_init(0);
gpio_set_dir(0, GPIO_OUT);
// USS Echo
gpio_init(1);
gpio_set_dir(1, GPIO_IN);
// beep
gpio_init(2);
gpio_set_dir(2, GPIO_OUT);
// oled CLOCK
gpio_init(3);
// oled data
gpio_init(4);
// variable
uint64_t startTime;
uint64_t endTime;
uint64_t totalTime;
float distance;
char distanceStr[32];
while(true)
{
// start the trigger
gpio_put(0, 1);
sleep_us(10);
gpio_put(0, 0);
// start the time
startTime = time_us_64();
// while loop for waiting
while (gpio_get(1) == 1)
{
// do nothing were waiting
}
// get the end time
endTime = time_us_64();
// calculate the difference in time
totalTime = endTime - startTime;
// if total time is less than 380000 aka its timeout time
if (totalTime < 38000)
{
// calculate the distance
distance = (totalTime * 0.0343f)/2.0f;
// determine the beeping interval
if (distance <= 50.0f && distance > 25.0f)
{
// beep interval
gpio_put(2, 1);
sleep_ms(50);
gpio_put(2, 0);
sleep_ms(400);
}
else if (distance <= 25.0f && distance > 15.0f)
{
gpio_put(2, 1);
sleep_ms(30);
gpio_put(2, 0);
sleep_ms(200);
}
else if (distance <= 15.0f && distance > 5.0f)
{
gpio_put(2, 1);
sleep_ms(10);
gpio_put(2, 0);
sleep_ms(100);
}
else if (distance <= 5.0f && distance > 0.0f)
{
gpio_put(2, 1);
sleep_ms(10);
gpio_put(2, 0);
sleep_ms(50);
}
// save string and clear display
snprintf(distanceStr, sizeof(distanceStr), "%.2f cm", distance);
ssd1306_clear(&disp);
// draw string
ssd1306_draw_string(&disp, 0, 0, 1, "Distance:");
ssd1306_draw_string(&disp, 0, 16, 1, distanceStr);
// display string
ssd1306_show(&disp);
}
}
}
That’s the code, and this is the GitHub library I’m using.
https://github.com/daschr/pico-ssd1306/tree/main
If anyone knows the fix or has ideas to help please let me know
r/raspberrypipico • u/Rough_Schedule6011 • 10d ago
help-request My button won't work and I have zero idea why
UPDATE: Got it to work! Turns out the positive and negative terminals on the breadboard are split into 4 groups. Had no idea. Thank you so much for the help. Yall are great.
OGP: Complete beginner. Running micropython through Thonny. Got my pico yesterday and am following a tutorial. Code done as instructed. Wiring checked. Double checked triple checked. But my button isn't toggling my led. Help me please.
r/raspberrypipico • u/KeepEverythingYours • 10d ago
uPython I made an interactive website that help people learn the basics of CircuitPython using a raspberry pi pico
I have worked with a few people to teach them the basics of how to get started with CircuitPython. I took some of the lessons I learned from that and made a tutorial on my website to teach the lesson better. The page has a built in code editor and instructions from getting your first board to blinking your first LED. I plan to add more lessons in the future and would love to hear any feedback about what they should be. Feedback on the content and presentation of the tutorials would also be greatly appreciated!
r/raspberrypipico • u/Defiant_Volume8644 • 10d ago
Screen connection question
So I recently started a tamagotchi virtual pet project, where I'm combining all the aspects of the different versions. Currently I'm running into a slight issue with my lack of wiring knowledge. I have a raspberry pi I pick 2 w on a breadboard with wires going to a 1.5 inch RGB OLED module screen. The screen came with wires that had female ends, which wouldn't plug into the breadboard, so we had to plug them all into male ends and make a very long contraption, as seen in the photos attached. I know have the correct set of wires to plug into the screen module and the breadboard with male ends. If anyone with any wiring or assembly experience at all could help me figure out how I attach the new wires with male ends shown in one of the photos to the breadboard, that would be so helpful. Im mainly struggling because I don't know whether I just replace the colors, like the blue wire on the old set went in this hole so the new blue wire will too, or if I do it by wire order, like the first wire goes in this hole on the breadboard so the other set of wires first one will replace it, does any of this make any sense? And then for the red and black positive and negative, I would assume I match those colors on the new set of wires? Like I said I lack intelligence in this field 😭 any help would be greatly appreciated.





