Skip to content

Add a touchscreen and audio to your fightstick because why not

Notifications You must be signed in to change notification settings

iamameme/fightstick-companion-pico

Repository files navigation

Fightstick Companion

  • This code makes your Pi Pico play a GIF and play audio on touch of a touchscreen
  • Not really related to this but, my use-case was to attach this to my fight stick
  • By attaching your Pico to the VCC_5V and GRD on your Brook fight board (I used a Brook Zero Pi), it runs off the USB connection!
  • I don't really know if you could use something more powerful, but I was trying to use as little power as possible, so we REALLY push the limits of the Pico
  • But it works

Make image files for screen

  • For an image, use python img2rgb565.py <filename>
  • For a gif, use python gif2raw.py <filename> <frameno>
  • For cropping gifs to screen size, I used: https://ezgif.com/crop

They are located in helper_functions folder

Parts Used

  • Raspberry Pi Pico
  • 3W Speaker
  • ili9341 Driven Display (Others probably work, but the cheap Waveshare ones are that driver) w/ TouchScreen
  • 2.5W Amp (Any amp works)
  • UNRELATED: Brook Zero Pi Fight Board

Total Cost: ~$40 + Fight Board

Exact Parts

Yes everything is from amazon; don't do the same. It's cheaper elsewhere and you can support local online businesses.

Test with examples

  • In the examples folder, there is an audio folder with a wav file, place that on your pico
  • Inside of examples, there is also an images folder, with a couple examples
    • Place the .raw files from one of those folders onto the pico
  • Alter main.py with the file names of your wav/raw files
  • Put all files in the root of this project onto your pico (chunk.py, ili9341.py, etc.)
  • Change all the pins in main.py to account for where your things are plugged in

Notes

  • Audio is pre-programmed to be on GPIO Pin 3/4 (Only one of them worked for me)
  • My amp has two outs (R/L), but since it's Mono, ground the unused one
  • The audio runs into OSError: 84 sometimes (and 20), so some try/catch loops catch it
    • This means that the audio will sometimes just stop, but it can be restarted
    • If someone wants to fix this, please do
  • Space is an issue, so I realized that 7 320x240 images and one wav file was the limit
    • An aftermarket Pico with more storage will enable longer gifs / more audio files

Code that I didn't write

About

Add a touchscreen and audio to your fightstick because why not

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages