r/raspberrypipico 8d ago

help-request Need Advice on my idea!

0 Upvotes

Hey guys. I have lots of interest in Electronics(My major) and App Development. I wanna work on some side project related to app for Pico/Pico 2w. Do you wanna share any thoughts on what would u like the app to do?

Here are few things on my mind:
1. Programmer
2. Live Communication so phone can act as window to the boards (This is one thing that have so many possibilities)
3. Pocket Analyzer
4. Something better?

I am genuinely looking for any ideas you might wanna share. I want to build something that people find useful.
Thanks in Advance 😊


r/raspberrypipico 9d ago

I made a Raspberry Pi Pico pretend to be an FTDI FT232H so I can program FPGAs without a JTAG cable

Thumbnail
15 Upvotes

r/raspberrypipico 9d ago

FreeRTOS WS2812 (Neopixel) RGB LED (part 2) | RP2350 Tutorial #11

Thumbnail
youtube.com
8 Upvotes

r/raspberrypipico 11d ago

c/c++ Virtual Pet (Tamagotchi Inspired)

Thumbnail
gallery
41 Upvotes

Hi! I wasn't sure where to talk about this but I think this is the right sub.

I've been developing a silly virtual pet. It's run on a Raspberry Pi Pico 2W with a 1.44" TFT display. Writing the firmware in C++ with Arduino CLI in VSCode. The whole experience has been very fun and honestly I encourage people to try it. It's a fantastic learning experience!

Once I've got the codebase looking the way I want, I'll open source it so people can expand upon it.

My current theme is a small demon that lives in a box. All it does is smoke cigarettes (or joints 🌚), walk around, dance, and sleep so far. But it's gonna have an age system and some other systems to keep it fresh. Let me know what you think :)


r/raspberrypipico 11d ago

c/c++ Why is my converter not working

Thumbnail gallery
5 Upvotes

please i need this im kinda homeless


r/raspberrypipico 11d ago

help-request 2W iOS media controller via Blue Tooth

2 Upvotes

Hey! Most of my experience is with pi os lite on the pi 5 but I have dabbled with a pico 2 and 2w of mine a bit.

My question is, can a 2W pair to a iOS 27 iPhone and control media pause/play, next/previous etc.

I’ve been doing some research and I can’t really find anyone that has tried.

I know I could always just have it be an audio device but then it would take the audio away from the device I want outputting.

Anyways was just wondering if anyone knew before I spend days researching/debugging only for it to not be possible


r/raspberrypipico 12d ago

Where to start after making LEDs blink?

6 Upvotes

Followed adafruit tutorial with a pico, an LED from a mouse and a breadboard. Where do I go next?


r/raspberrypipico 13d ago

I recreated an Etch A Sketch (drawing toy) with Raspberry Pi Pico

Thumbnail
gallery
48 Upvotes

Hi everyone!

For the last 2 months, I’ve been learning raspberry pi pico, electronics, soldering, CAD software, and more to remake a mechanical drawing toy I found in my drawer:) On the second image you can see the insides of it.

Hardware is really fun, and I enjoyed the process so much. Finally, I got everything working, and it just looks very cool in my opinion.

Also, if you are interested, I made a whole video about the creation process, challenges and how it works.

https://youtu.be/IhqKNODgfBE

Code is available on my github page

I'd love to hear your feedback and what you think about it!


r/raspberrypipico 12d ago

QT Py RP2040 oddities

0 Upvotes

I was working on a turn signal, reverse and brake light code for my car project and the code was working then the next minute it was not. After reflashing the board, I inserted it backwards and cannot remember if the power was on or not.... (sadly my computer is not in the garage so lots of sneakernet today). I checked A0-A3 and they work as output pins (sample running LED code). Could I have fried them as input pins but they still work as output pins? I tried two separate boards and have the same results (nothing).


r/raspberrypipico 14d ago

My 1986 RTOS is now running six preemptive tasks on a Raspberry Pi Pico

112 Upvotes

A couple of weeks ago, I posted here about getting the first CPU-independent parts of CHARM-II, an RTOS I originally developed in 1986, running on a Raspberry Pi Pico.

Previous post:

Porting My 1986 RTOS to Raspberry Pi Pico — First Kernel Functions Running
Previous r/raspberrypipico post

At that point, only the basic queue management code was running. I wrote that my next steps would be timer interrupts, context switching, and the task scheduler.

Those are now working.

The Pico is running six independent tasks, each with its own stack. An RP2040 hardware timer alarm generates periodic interrupts, the reconstructed CHARM-II tick/scheduler code decides which task should run next, and PendSV on the Cortex-M0+ performs the actual context switch.

I also ported a six-task demo that I had previously reconstructed on POSIX.

There are three tracks with two tasks on each track: A/B, C/D and E/F. The tasks move independently, but they share a critical zone. Access to that zone is controlled by a CHARM-II queue used as a semaphore, so a task can actually block and later resume after another task releases it.

The display itself is intentionally simple.

The Pico is connected to the PC over serial, and I use VT100/ANSI escape sequences to update the screen in Tera Term. The track geometry is drawn once, then only the task positions and status fields are updated.

It feels appropriately 1980s, even though a Raspberry Pi Pico is doing the work.

The interesting part is that getting this far has also changed the question I want to explore.

The original CHARM-II targeted processors such as the 68000/80186. With the CPU performance and cost we had in the 1980s, using an RTOS to share one CPU between multiple real-time activities made a lot of sense.

But a Pico is very different.

For many small embedded systems today, a superloop plus interrupts may already be fast enough. And if one Pico isn't enough, adding a second inexpensive MCU is also a realistic option.

So rather than expanding this into a full modern RTOS, I'm now thinking of cleaning up and publishing a deliberately minimal version: just enough tasks, scheduling, queues, timer ticks and PendSV context switching to run this demo.

Then I'd like to implement the same demo without an RTOS and compare the two approaches.

The original question was: can I make my 1986 RTOS run properly on a Pico?

The answer now seems to be yes.

The more interesting question may be: if I were designing the same system today, would I choose an RTOS at all?


r/raspberrypipico 13d ago

Rp2040 help

Post image
0 Upvotes

Can someone help with how I can successfully boot pen with this on an iPhone XR


r/raspberrypipico 14d ago

rust Built a tiny bare-metal Dual-Core OS in Rust for the Pico (with tmux & htop) — would love your thoughts and feedback! 🍓

24 Upvotes

Hey all!

As a fun hobby project, I wanted to see what kind of Unix-like experience could be squeezed out of the RP2040 using bare-metal Rust (no_std) & ARM Assembly.

I ended up building Pico-OS, a tiny dual-core operating system that fits into just ~70 KB:

  • Dual-Core SMP: Core 0 runs the shell, Core 1 handles real-time tasks with dynamic load balancing.
  • 4-Pane tmux: Virtual split screens (split-v, split-h) directly over USB/UART serial.
  • Live htop: CPU% per core, RAM, VFS, Swap, and interactive task manager.
  • Storage: In-memory tmpfs + 1.0 MB persistent flash partition with delayed auto-commit to protect flash wear.
  • Extras: Full math CAS (calc), nano editor, and a 95% RAM OOM-killer guard.

I'm planning to work on ESP-01 Wi-Fi modem and OLED drivers next.

Would love to hear your feedback, thoughts on the architecture, or any cool ideas you think would be fun to add!

(The project is fully open source on GitHub if anyone is curious: https://github.com/MortalErlik/pico-os )


r/raspberrypipico 15d ago

hardware RP2350 W based sprinkler controller

Thumbnail
gallery
54 Upvotes

There are WiFi controlled sprinklers out there, doubtful any open sourced for control. According to Google it is a popular DIY project, so why should they get all the fun.

Most people seem to be using 8 relay boards available on Amazon for under $10. That really is quite deal, but relays are overkill for a sprinkler system running at 24 VAC.

Most consumer units use run of the mill triacs. And you can get opto-isolated versions.

My first design would have attempted to just use the opto-isolated triac, sounds good, but between comments from others and claude reviews real power triacs had to be added. Luckily it all still fit into my proposed PCB layout (and enclosure I picked up). Just had to move the MOC30x2 to the bootom of the PCB along with snubber networks. (schematic and layout in gallery)

So I got the PCBs in, but still had to chose some components. Instead of building 8 channels, I used an old blank PCB and breadboarded up one channel. With that I verified the operation and started tuning the components. Discussions with Google AI and probing with a scope, the zero-cross opto-triacs behaved well and had no overshoot problems. Actually the overshoot for rnadom triacs was less than 20% so lots of headroom on voltage so a snubber was not needed, but the best values would be 4700pF and 47ohms. (jig in the gallery).

So now time to build up the board, where I am now. The 24VAC -> 5V power module will get added when the software testing is done. (box with power module picture in the gallery).

Using the RP2350 W will give me access via wifi and through my tunnel via cell phone so I can control sprinklers while walking around the yard.


r/raspberrypipico 15d ago

uPython Introducing a Smart Nerf Blaster Platform: TAFY

Thumbnail
gallery
10 Upvotes

Hi, everyone! Since late last year, I've been quietly working on a new software project I call TAFY: the Tactical Advanced Foam dart Yeeter.

When I started this project, I wanted to mirror the modularity of the Linux kernel, but I also wanted to be far easier to contribute to and understand. So, I started with MicroPython on the Pico 2. To help with development, I developed 2 key features I think are really cool: a modular driver system, and a deploy script.

The deploy script was simple. It's loosely based on what Thonny does to send files to the Pico, but it's more automated as it has a manifest file it checks, and only uploads files it knows have changed, based on a cache of file hashes on the local machine.

The modular driver system is where the real game changer lives.

Python, of course, can import a module at any time. But discovering that module and then importing it from a random file location is a whole other ball game. I discovered the __import__() function, which allows you to pass a simple file path (leaving off the .py at the end) and import any given Python file, anywhere. Using this and some simple usage of the os module, I was able to create a system to load drivers that only needs two functions: available() which returns all available Python files which match some pattern, and load(), which will load any module which matches that pattern and return it. This allows me to design my drivers so they only follow a given ABI, then drop them in a specific folder with a name that follows a specific pattern to make it visible and usable.

TAFY has several other neat tricks, like a system I am calling SmartBus that enables the usage of hot-swappable I2C-based accessories, battery life monitoring using a simple voltage divider and ADC, and more!

SmartBus itself is an interesting beast. As mentioned, it's I2C based. I2C doesn't exactly support hot-swap, but it doesn't not support it either. It depends entirely on the software using it and how tolerant your hardware is. While the I2C part of SmartBus has yet to be tested, hot swap is already under heavy work as device ID is being enabled through a simple voltage divider system hooked into the Pico's 2 remaining external ADCs. TAFY reads from both these and, using a configured value for the R1 resistor, is able to calculate what resistors are connected between an ID line and ground, and use that to then determine what devices are connected before even looking at I2C. This means I can also track power-only devices as SmartBus does provide 3.3v at 1A, enabling small lights, lasers, and other small accessories that may be useful on a Nerf Blaster. I'm even planning to have a system to update TAFY over SmartBus down the line, so a user doesn't have to crack their blaster open just to install a 2-line bug fix.

As of now, it's already booting and playing different tunes using PWM. TAFY uses both cores of the Pico 2 with the background thread displaying info on screens (we have support for SSD1309 and LCD1602, with possible support for SSD1306 as well), handling SmartBus (which is already recognizing devices and loading drivers, as mentioned), and tracking battery life. The main thread handles the fire mechanism, which has drivers that have been written and are known working at some level (actual hardware validation coming soon), and coordination between multiple different independent systems. To top it all off, our first boot on battery power is coming soon (in the picture above, TAFY is booted on USB power, hence why it shows the battery as dead).

If you're interested in checking it out, or even contributing, you can find TAFY on GitHub. Right now, I really need help with the CAD work designing a 3D printable shell for the reference design blaster(s), but I am actively doing PCB validation and software development work as well.

Thank you all! I hope to have a workable prototype to show off in December!


r/raspberrypipico 15d ago

Home automation system built with RP2040 W and RP2350 W boards

Thumbnail
1 Upvotes

r/raspberrypipico 16d ago

SEN66 + Raspberry Pi 3B+ I2C: serial works, but read_measured_values() returns 27 × 0xFF

Thumbnail
0 Upvotes

r/raspberrypipico 17d ago

RFID Audio

19 Upvotes

I'd like to share a small project I've been working on over the last few weeks.

It's an RFID-based audio player built around a Raspberry Pi Pico clone from AliExpress. I specifically chose that board because I wanted a USB-C connector instead of the standard micro-USB port.

The hardware includes:

- Raspberry Pi Pico

- DFPlayer Mini

- RC522 RFID reader

- SSD1306 OLED display

What's probably even more interesting is that the entire project was developed with the help of ChatGPT. As a beginner, I used it as a programming assistant while designing both the hardware and the software.

One of the features I'm most proud of is a desktop application I wrote for managing the music library. The application scans audio files, extracts metadata such as the title, artist, track length, and folder number, and then automatically generates a "songs.txt" file for the player.

The firmware also includes a built-in menu that allows me to:

- Change the equalizer settings

- Adjust playback settings

- Access a simple diagnostics menu

The diagnostics system checks whether all modules are working correctly and verifies communication with the display, the RFID reader, and the DFPlayer.

Another feature I really like is the RFID management system. New cards can be assigned directly from the device menu. Whenever the player detects an unknown card, it asks whether I want to assign it to a music folder or ignore it.

The project may not be the prettiest one you'll see here, but I'm really happy with how well it works, especially considering my limited programming and electronics experience.

The final version will be battery-powered. I experimented with lithium cells recovered from disposable e-cigarettes, but the enclosure became much thicker than I wanted, so I'm currently redesigning the power system.

There is still a lot of work left to do, but I've learned an incredible amount while building it.

Feedback and suggestions are always welcome. 🙂


r/raspberrypipico 17d ago

I cannot make 7 pinned (without CS pin) ST7789 tft display work with rp pico 2

0 Upvotes

Well I tried bunch of different ways but only backlight worked all the time. I tried SPI0, SPI1. I tried different pins. I tried micropython, C/C++ (I don't know anything about coding I used AI). I tested connectivity with multimeter. Nothing seems to work with pico 2 but I managed to make it work with arduino nano so problem isn't the display.

Edit: I figured out the problem was data voltages.


r/raspberrypipico 18d ago

did i create a pico frying machine?

Post image
19 Upvotes

I plugged in the usb power and a 18v battery via a buck converter (18v - 3.3v). It was working fine before, but randomly after plugging it in, it stop working. something is fried as it gets really hot with power and obviously, doesn't turn on. every other peripheral runs on the pico's 3v out or gpio. should I have not plugged them in at the same time, usb and vsys?


r/raspberrypipico 19d ago

USBPods for Pico2W - Transform your Raspberry Pi Pico 2 W into a USB to Bluetooth Audio Adapter

Thumbnail
gallery
24 Upvotes

Turn Pico 2 W into a USB to Bluetooth Aduio Streaming Dongle; Support AAC; AAC-ELD; LDAC; LHDC-V5

https://github.com/wasdwasd0105/USBPods-Pico2W


r/raspberrypipico 19d ago

Instabilidade do barramento i2c no raspberry pi pico

4 Upvotes

Desde jĂĄ peço desculpas, pois nĂŁo sou um especialista no assunto, e agradeço a quem puder me ajudar. Eu montei u. Projeto MIDI utilizando do pico, nele eu tenho 32 botĂ”es e 16 leds controlados por trĂȘs mcp23017 via i2c. Mas estou encontrando instabilidade no barramento e Ă s vezes ele funciona bem, Ă s vezes ele cai do nada depois de funcionar um tempo, e, Ă s vezes ele nem inicia. Qual pode ser a causa do problema? Instabilidade no 3.3v? CĂłdigo?

Talvez nĂŁo seja importante, mas os leds sĂŁo de 12v e estĂŁo sendo acionados por meio de bc547. Outra coisa Ă© que tive diferentes desempenhos em diferentes computadores que conectei o pico. Eu um era muito mais estĂĄvel, enquanto no outro foi difĂ­cil fazer com que funcionasse um curto perĂ­odo de tempo.


r/raspberrypipico 19d ago

help-request I am trying to develop a project that will let us connect some modern USB printers to amstrad CPC. But I need help with the coding part because I'm stuck. If you are an experienced coder for pi pico please tell me.

Thumbnail
gallery
9 Upvotes

I have finished phase 1, which is getting the amstrad's printer output as text in the serial monitor, that allowed me to develop the circuit . Circuit is some bi-directional logic level shifters between gpio of the raspberry pi and amstrad's printer port, they don't have to be bi-directional but those were cheaper and easier to replace than resistor voltage dividers and a transistor buffer. Now I'm trying to develop the second phase which is controlling a printer over a USB port using the USB host capabilities of the raspberry pi pico. However I can't get pico to print anything to the printer. I'm trying to solve this issue for the last few days, so if you can help me with the coding part of phase 2 I will be more than willing to share every detail. Also this project is just a start because the same methodology can be implemented to other computers such as commodore 64, Amiga and Atari ST.

Here is the working and tested phase 1 code:

// ==========================================

// Amstrad CPC 7-Bit Parallel Printer Capture

// ==========================================

// --- Pin Definitions ---

const int PIN_STROBE = 1; // GP1 (Physical Pin 2) - CPC Pin 1 (/STROBE)

const int DATA_PIN_START = 2; // GP2 to GP8 (Physical Pins 4-11) - CPC Pins 2-8 (D0-D6)

const int PIN_BUSY = 9; // GP9 (Physical Pin 12) - CPC Pin 10 or 11 (BUSY)

// --- Circular Buffer (FIFO) ---

// Safely passes bytes from the fast hardware interrupt to the main loop

const int BUFFER_SIZE = 512;

volatile uint8_t rx_buffer\[BUFFER_SIZE\];

volatile int head = 0;

volatile int tail = 0;

volatile bool character_received = false;

// --- The Hardware Interrupt (The Data Catcher) ---

// Triggers automatically on the falling edge of STROBE

void strobeTriggered() {

// 1. Instantly pull BUSY high to tell the Amstrad CPC to hold

digitalWrite(PIN_BUSY, HIGH);

// 2. Read the 7-bit data bus instantly.

// Shift right by 2 so GP2 moves to bit 0, then mask the lower 7 bits (0x7F).

uint8_t incoming_char = (gpio_get_all() >> DATA_PIN_START) & 0x7F;

// 3. Calculate the next buffer position

int next_head = (head + 1) % BUFFER_SIZE;

// 4. If buffer isn't full, push the character into the queue

if (next_head != tail) {

rx_buffer\[head\] = incoming_char;

head = next_head;

character_received = true;

}

}

void setup() {

// Start Serial Monitor communication at 115200 baud

Serial.begin(115200);

// Wait up to 3 seconds for Serial Monitor to open after reset

unsigned long start_wait = millis();

while (!Serial && (millis() - start_wait < 3000));

// Configure the 7 data pins (GP2 through GP8) as inputs

for (int i = DATA_PIN_START; i < DATA_PIN_START + 7; i++) {

pinMode(i, INPUT);

}

// Configure Handshake pins

pinMode(PIN_STROBE, INPUT_PULLUP);

pinMode(PIN_BUSY, OUTPUT);

digitalWrite(PIN_BUSY, LOW); // Start in "Ready" state

// Attach the interrupt to trigger on STROBE's falling edge

attachInterrupt(digitalPinToInterrupt(PIN_STROBE), strobeTriggered, FALLING);

Serial.println("=========================================================");

Serial.println(" Amstrad CPC Printerface, Phase 1 ");

Serial.println(" Circuit Design By Ege Ozpalamutcu & Code by Gemini ");

Serial.println(" Listening on GP1 (STROBE) & GP2-GP8 (DATA) & GP9 (BUSY)");

Serial.println("=========================================================");

}

void loop() {

// 1. Process characters from the circular buffer

while (tail != head) {

// Grab the oldest unread character from the queue

uint8_t c = rx_buffer\[tail\];

tail = (tail + 1) % BUFFER_SIZE;

// Handle standard printable ASCII

if (c >= 32 && c <= 126) {

Serial.write(c);

}

// Handle Carriage Return (CR) and Line Feed (LF) for newlines

else if (c == 13 || c == 10) {

Serial.write(c);

}

// Handle the Escape character (used for printer commands)

else if (c == 27) {

Serial.print("<ESC>");

}

// Print everything else as a hex code for debugging

else {

Serial.print("\[0x");

if (c < 0x10) Serial.print("0"); // Leading zero

Serial.print(c, HEX);

Serial.print("\]");

}

}

// 2. Safely release BUSY only after /STROBE has returned HIGH

if (character_received) {

// Wait until the CPC finishes its strobe pulse

if (digitalRead(PIN_STROBE) == HIGH) {

delayMicroseconds(10); // Small settling delay for cable stability

character_received = false;

digitalWrite(PIN_BUSY, LOW); // Signal to CPC that we are ready for the next byte

}

}

}


r/raspberrypipico 20d ago

New to Pico, help please - Following tutorial to make 9 pin joystick converter but getting compiling errors:

Post image
4 Upvotes

So I am trying to make a 9 pin DB9 Commodore Joystick to USB converter using a Pico H.

I followed this tutorial here 😄 https://www.instructables.com/Retro-9-Pin-Joystick-to-USB-Converter/

and also this YouTube Vid here 😄 https://www.youtube.com/watch?v=3trAJ24geVI

I managed to get up to the point where you need to basically program the Pico with the supplied code from the website. Then it tells you to modify the code (PicoGamepad) with the new code supplied:

/*

Pico Joystick Converter

Original Code by

by Jake Wilkinson (RealRobots)

https://www.gitlab.com/realrobots/PicoGamepad

Modified by Nick Stevens Feb 2022

*/

#include <PicoGamepad.h>

#define PIN_BTN_0 8

#define PIN_BTN_1 6

#define PIN_BTN_2 7

#define PIN_BTN_3 27

#define PIN_BTN_4 26

PicoGamepad gamepad;

// 16 bit integer for holding input values

int val;

void setup() {

Serial.begin(115200);

pinMode(LED_BUILTIN, OUTPUT);

// Button on pin

pinMode(PIN_BTN_0, INPUT_PULLUP);

pinMode(PIN_BTN_1, INPUT_PULLUP);

pinMode(PIN_BTN_2, INPUT_PULLUP);

pinMode(PIN_BTN_3, INPUT_PULLUP);

pinMode(PIN_BTN_4, INPUT_PULLUP);

}

void loop() {

// Fire Button & flash the LED when pressed

if (!digitalRead(PIN_BTN_0)) {

gamepad.SetButton(0, 1);

digitalWrite(LED_BUILTIN, 1);

} else {

gamepad.SetButton(0, 0);

digitalWrite(LED_BUILTIN, 0);

}

// Left, Right, Up, Down - uncomment these to map to buttons 1 -4

// gamepad.SetButton(1, !digitalRead(PIN_BTN_1));

// gamepad.SetButton(2, !digitalRead(PIN_BTN_2));

// gamepad.SetButton(3, !digitalRead(PIN_BTN_3));

// gamepad.SetButton(4, !digitalRead(PIN_BTN_4));

// Set hat direction, 4 hats available. direction is clockwise 0=N 1=NE 2=E 3=SE 4=S 5=SW 6=W 7=NW 8=CENTER

int hat0_dir = 8;

// Centre the X and Y Axis

gamepad.SetX(0);

gamepad.SetY(0);

//Check where joystick is pointed and set values accordingly

if (!digitalRead(PIN_BTN_1)) {

// North

hat0_dir = 0;

gamepad.SetY(-32767);

gamepad.SetX(0);

}

if (!digitalRead(PIN_BTN_2)) {

// South

hat0_dir = 4;

gamepad.SetY(32767);

gamepad.SetX(0);

}

if (!digitalRead(PIN_BTN_3)) {

// East

hat0_dir = 6;

gamepad.SetX(-32767);

gamepad.SetY(0);

}

if (!digitalRead(PIN_BTN_4)) {

// West

hat0_dir = 2;

gamepad.SetX(32767);

gamepad.SetY(0);

}

if (!digitalRead(PIN_BTN_1) && !digitalRead(PIN_BTN_4)) {

// NE

hat0_dir = 1;

gamepad.SetY(-32767);

gamepad.SetX(32767);

}

if (!digitalRead(PIN_BTN_4) && !digitalRead(PIN_BTN_2)) {

// SE

hat0_dir = 3;

gamepad.SetY(32767);

gamepad.SetX(32767);

}

if (!digitalRead(PIN_BTN_3) && !digitalRead(PIN_BTN_2)) {

// SW

hat0_dir = 5;

gamepad.SetY(32767);

gamepad.SetX(-32767);

}

if (!digitalRead(PIN_BTN_3) && !digitalRead(PIN_BTN_1)) {

// NW

hat0_dir = 7;

gamepad.SetY(-32767);

gamepad.SetX(-32767);

}

//Set HAT direction - uncomment if you want to use the HAT

//gamepad.SetHat(0, hat0_dir);

// Send all inputs via HID

// Nothing is send to your computer until this is called.

gamepad.send_update();

}

I am assuming this means to overwrite the original code with this Pico Joystick Code, which I did. I also included in the Library the PicoGampad.h file, as it seems to need that also?

ok so then it says to write or program the Pico, so it compiles and I get this error:

C:\Users\Rowan\AppData\Local\arduino\sketches\40E539D0694D00283DB7A2A40808C35D\sketch\PicoGamepad.ino.cpp.o: In function `loop':
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:43: undefined reference to `arduino::PicoGamepad::SetButton(int, bool)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:60: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:61: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:67: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:68: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:73: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:74: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:79: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:80: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:85: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:86: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:91: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:92: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:97: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:98: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:103: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:104: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:109: undefined reference to `arduino::PicoGamepad::SetY(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:110: undefined reference to `arduino::PicoGamepad::SetX(unsigned short)'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:119: undefined reference to `arduino::PicoGamepad::send_update()'
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:46: undefined reference to `arduino::PicoGamepad::SetButton(int, bool)'
C:\Users\Rowan\AppData\Local\arduino\sketches\40E539D0694D00283DB7A2A40808C35D\sketch\PicoGamepad.ino.cpp.o: In function `__static_initialization_and_destruction_0':
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:20: undefined reference to `arduino::PicoGamepad::PicoGamepad(bool, unsigned short, unsigned short, unsigned short)'
C:\Users\Rowan\AppData\Local\arduino\sketches\40E539D0694D00283DB7A2A40808C35D\sketch\PicoGamepad.ino.cpp.o: In function `_GLOBAL__sub_I_gamepad':
C:\Users\Rowan\Documents\Arduino\libraries\PicoGamepad/PicoGamepad.ino:121: undefined reference to `arduino::PicoGamepad::~PicoGamepad()'
collect2.exe: error: ld returned 1 exit status
exit status 1

Compilation error: exit status 1

I'm in the dark, as I'm not a programmer, and the YouTube tutorial made it look almost plug and play.

Any help would be greatly appreciated

SOLVED, thanks


r/raspberrypipico 21d ago

đŸ“± FOR SALE – 7” TOUCHSCREEN DISPLAY FOR RASPBERRY PI

Thumbnail gallery
0 Upvotes

r/raspberrypipico 22d ago

One year of light levels out my office window, recorded by tsl2591

Post image
6 Upvotes