Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Raspberry Pi Pico??  (Read 2996 times)

0 Members and 1 Guest are viewing this topic.

Slippyblade

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3167
  • Last login:November 16, 2023, 11:39:51 am
  • And to the death god we say, "Not today!"
Raspberry Pi Pico??
« on: July 12, 2022, 06:30:02 pm »
Hey all, long time, no post!

I literally just learned about the RPi Pico. I did a few quick searches around the forums and am finding surprisingly little about it. So...

What is currently the most readily available keyboard encoder?
How about doing analog inputs?

I've got a couple projects that are kicking around and the Pico looks to be a possible solution, but I don't wanna re-engineer the wheel if there is an out-of-the box solution that is readily available.

Thanks in advance, folks!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 02:12:01 pm
  • Designated spam hunter
Re: Raspberry Pi Pico??
« Reply #1 on: July 13, 2022, 02:54:35 am »
I literally just learned about the RPi Pico. I did a few quick searches around the forums and am finding surprisingly little about it.
Looks like an interesting little board.   ;D

What is currently the most readily available keyboard encoder?
I assume you ask this because you're planning to roll-your-own instead of buying an I-Pac/A-Pac/U-HID, right?

The RasPi Pico is widely available and reasonably priced, but I'm not sure what kind of encoder firmwares have been developed for that board.   :dunno

ATmega32u4 boards like the Arduino Pro Micro, Arduino Micro, Arduino Leonardo, Itsy Bitsy 32u4, etc. are inexpensive and easy to make into HID devices.
*** Avoid 328P boards like the Pro Mini since they are almost impossible to make into HID devices. ***

The Arduino encoder ecosystem is pretty mature and there are quite a few good firmwares to choose from including:
- DaemonBite Arcade Encoder
- KADE miniArcade 2.0
- Baritonomarchetto's ArcadeHID sketches as covered in this instructable

How about doing analog inputs?
Both the RasPi Pico and 32u4 Arduino boards can do analog inputs as a HID gamepad.

The RasPi Pico has 3 Analog to Digital Converter (ADC) inputs. (dark green)
- It's enough for many setups, but not for a twin analog stick game like Cyber Sled.


A 32u4 Arduino board like the Micro has up to 12 ADC inputs.
- Some boards like the Pro Micro don't have connections for all of the 32u4 inputs.


I've got a couple projects that are kicking around and the Pico looks to be a possible solution, but I don't wanna re-engineer the wheel if there is an out-of-the box solution that is readily available.
You can probably find a 32u4 encoder firmware that meets your needs or you can combine baritonomarchetto's ArcadeHID sketches to make a custom composite sketch that is both a keyboard for keystrokes and a gamepad for the analog inputs.
- For example, Vee21 adapted Baritonomarchetto's analog firmware to add a 6-speed shifter in this thread.

As always, there are thousands of possibilities so the details for your particular applications matter.

Run each application through the design process in the What type of build meets my needs? section of the FAQ.
- Good info in steps 2 (game list) and 4 (controls/inputs list) lets you choose the right encoder in step 7.   :cheers:


Scott

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:Yesterday at 07:02:12 am
  • I want to build my own arcade controls!
Re: Raspberry Pi Pico??
« Reply #2 on: July 13, 2022, 07:43:08 am »
there is a website/forum for teensy type devices and arcade controls.

https://www.pjrc.com/teensy/td_joystick.html


whats crazy is some of these arduino's and the pico can run some 8 bit emulators now.

Slippyblade

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3167
  • Last login:November 16, 2023, 11:39:51 am
  • And to the death god we say, "Not today!"
Re: Raspberry Pi Pico??
« Reply #3 on: July 13, 2022, 05:26:24 pm »
Cool. I wasn't sure if things like the KADE were still even around. So many of these kinds of products/projects show up, are awesome, then disappear!

slybunda

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 126
  • Last login:March 21, 2024, 04:16:18 am
  • I want to build my own arcade controls!
Re: Raspberry Pi Pico??
« Reply #4 on: August 15, 2022, 05:03:32 am »
I used 2 arduino pro micros using daemonbite  hid to act as joystick interface. Works perfectly

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Today at 02:40:48 pm
Re: Raspberry Pi Pico??
« Reply #5 on: August 21, 2022, 02:43:21 am »
That pico board is very interesting because the microprocessor is a (up to) 133MHz dual core, it's fast and cheap. It can emulate mouse and keyboard, and there are evidences of gamepad emulation too. A valid alternative to arduino DUE which is expensive nowadaye (clones are sold for 40+ euros now... They used to be 15 euros before micros prices started to rise).
It has 26 pins, interrupts on all of them, PWM and, as Scott pointed out, only 3 analog inputs (who said "wheel, accel and brake"? :) ).
One thing that could confuse at first is the existence of more than one interpreter (micropython and circuitpython), but with time it will find it's own standardization, I suppose. Even if python is a user friendly language, all those different approaches are not for newbies. They added support for arduino IDE too...
I also learned about it very recently and I am developing one of my "jamma to PC only me and my dog will ever use"  ;D ... I am curious to see how it turns out :)
« Last Edit: September 01, 2022, 11:50:54 am by baritonomarchetto »

slybunda

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 126
  • Last login:March 21, 2024, 04:16:18 am
  • I want to build my own arcade controls!
Re: Raspberry Pi Pico??
« Reply #6 on: August 26, 2022, 05:47:06 am »
Pi pico seems to be the best for use as a joystick interface
https://m.youtube.com/watch?v=JSKn6qdkTKU&feature=youtu.be

eobet

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:September 20, 2022, 02:19:05 pm
  • I want to build my own arcade controls!
Re: Raspberry Pi Pico??
« Reply #7 on: September 01, 2022, 10:29:25 am »
I assume you ask this because you're planning to roll-your-own instead of buying an I-Pac/A-Pac/U-HID, right?

What is the latency of these boards you mention? They're not in the list I use to check (and I'm unsure of if any of them are even available in the EU)...

I don't wish to roll my own, but it looks as if I have to because both Daemonbite, the person behind the KTRL Arcade board who made ready assembled versions in their shop, and FeralAI, the person behind the ready made assembled Pico Fight Board have disappeared without a trace during the last year... (I hope they're all right).

Though their code is still there, the largest community seems to have formed around this:

https://gp2040.info/#/

However, I don't know where to find photos of people's builds using that. Especially how they solder headers and such themselves... that area is 100% alien to me as I've always been a software only person but I guess I'm going to have to buy some sort of soldering iron now...

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 02:12:01 pm
  • Designated spam hunter
Re: Raspberry Pi Pico??
« Reply #8 on: September 01, 2022, 03:12:24 pm »
What is the latency of these boards you mention? They're not in the list I use to check (and I'm unsure of if any of them are even available in the EU)...
The I-Pac, A-Pac, and U-HID are made in the UK by Ultimarc.
- They are also available from numerous arcade parts vendors.
- Several varieties of I-Pac are on page 9 of that list or use the search term "Ultimarc".

The Daemonbite Arcade controller is on the list, but --no surprise-- the KADE miniArcade 2.0 and Baritonomarchetto's ArcadeHID sketches are not.

I don't wish to roll my own, but it looks as if I have to because both Daemonbite, the person behind the KTRL Arcade board who made ready assembled versions in their shop, and FeralAI, the person behind the ready made assembled Pico Fight Board have disappeared without a trace during the last year... (I hope they're all right).

Though their code is still there, the largest community seems to have formed around this:

https://gp2040.info/#/

However, I don't know where to find photos of people's builds using that. Especially how they solder headers and such themselves... that area is 100% alien to me as I've always been a software only person but I guess I'm going to have to buy some sort of soldering iron now...
Soldering is pretty easy once you understand the basics and practice a bit on a junk PCB.   ;D

The most commonly used headers for PCBs like the Pico are either going to be 2.54mm (0.1") pitch straight pin Dupont headers with pre-crimped wires like these from Paradise Arcade Shop or screw terminals with the same 2.54mm pitch or no headers, just solder the wires directly to the board and maybe use some euro-style terminal strips.

   

Lots of great info in this How to solder, a picture tutorial thread.

You don't want to go too cheap on the soldering iron, but there are some pretty decent variable-temperature soldering stations for around $25.
- Bonus points if you get several types of tips.  Sharp narrow conical tips are more difficult to make proper contact for good heat transfer than the flat side of a chisel tip.
 

The brass-coil tip cleaners are much better than the sponge type.
- Before shutting off the iron, stab the brass coils a few times to clean the tip and re-tin the tip (put solder on it) to prevent corrosion.


A "no-clean" flux pen similar to this one is your friend.

You may want some wire strippers, flush-cut pliers, desoldering braid, and/or a solder sucker.

A silicone mat like one of these is also a great soldering accessory.  Most come with recesses to hold hardware.

 

Please feel free to ask if you have any questions.   :cheers:


Scott

eobet

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:September 20, 2022, 02:19:05 pm
  • I want to build my own arcade controls!
Re: Raspberry Pi Pico??
« Reply #9 on: September 02, 2022, 02:56:50 am »
Wow, thank you very much! That's some great and concise info!

Turns out the GP2040 community is quite active indeed, and I may have gotten a lead on some even smaller boards than the Pi Pico...
« Last Edit: September 02, 2022, 02:59:58 am by eobet »

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Today at 02:40:48 pm
Re: Raspberry Pi Pico??
« Reply #10 on: September 08, 2022, 12:53:13 am »
I have collected some info (and placed an order over alixprss :)). Even if the genuine pi pico board has three analog axis hardwired, the RP2040 processor it is built around actually has four. The same is true for GPIOs: the board has 26 i/o wired, but the processor has 29.
There exists a very interesting cinese "clone" with all four analog pins and 28 GPIOs made available. It costs 5 euros shipped... Not bad at all.
The two interpreters (circuitpython and micropython) are not compatible, even if the first is a fork of the second. This means that you will have no luck triyng to merge codes written for the one or the other.
Gamepad emulation was supported in circuitpython only, but was deprecated because not compatible with all OS.
Arduino IDE supports pico throught an official and an unofficial board packages. The unofficial looks the right choice being that it ports more functions at today. The most interesting point here is that it supports HID enulation: mouse, keyboard AND joystick :cheers:

slybunda

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 126
  • Last login:March 21, 2024, 04:16:18 am
  • I want to build my own arcade controls!
Re: Raspberry Pi Pico??
« Reply #11 on: October 01, 2022, 07:25:35 am »
Who using gp2040?

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Today at 02:40:48 pm
Re: Raspberry Pi Pico??
« Reply #12 on: October 17, 2022, 09:50:43 am »