Skip to content

drew-wallace/switchberry

Repository files navigation

The SwitchBerry Setup Guide

The SwitchBerry is a mobile PC game streaming device inspired by the Nintendo Switch and made from a Raspberry Pi. The goal was to play my PC games on the go, mouse and keyboard free, with little to no latency, and a steady frame rate.

Table of Contents

Credits

I did not do this project alone. I was helped by friends, family, and the Parsec community. Because of how awesome everyone has been, I feel the credits should come first.

  • My wife: for letting me spend a chunk of change and most of my free time for the past month on this!
  • @CBNathanael#5078 from the Parsec Discord: Helped all throughout the project. We bounced ideas off each other. He helped me visualize things. Most notably he helped with the power circuit planning and gave me a visual diagram of how to hook it all up.
  • My dad: for soldering the power circuit for me.
  • My pastor: for 3D printing my case over and over as we tweaked the design and dialed in the tollerances.
  • @Rysha#1207 from Parsec and the Parsec Discord: for helping me troubleshoot issues on my Pi with Parsec and my Joy-Cons.
  • Kane York (riking): for developing (and continuing to develope) the Joy-Con driver I'm using.
  • Pimoroni Ltd (pimoroni): for making the touchscreen driver I'm using.
  • Rob Jones (craic): for making the power solution I'm using.
  • @benjy_parsec#6335 the CEO of Parsec: for his generosity, encouragement, and availability to help.
  • Raspbery Pi Foundation: for making a small mobile computing solution that worked out wonderfully.
  • Parsec: for building the practically magic streaming solution that has such low latency to make the experience near flawless.
  • Nintendo: for making the Joy-Cons that power an awesome single player and even 2-player experience.
  • Microcenter: for selling me most of my hardware at a good price.
  • Adafruit: for selling me the smaller bits at a reasonable quantity and price.
  • Amazon: for selling me the last few parts I needed and shipping them quickly.
  • Best Buy: for having the Joy-Cons in stock! Also for having an SD card that works with the Pi.

Media

Hardware

Here are some public wish lists at MicroCenter, Adafruit and Amazon for the items linked above:

Software

  • Raspbian Lite
  • Etcher
  • You'll get the rest of it from this repo. After running the scripts from this repo, you'll be completely set up.

Setting Up the Hardware

Note: Do software steps 1-9 first. Also, if you get confused with the layout of things, check out the pictures above.

  1. 3D print this case but exclude the screen housing
  2. 3D print this screen housing
  3. Place screen into 3D printed housing
  4. Secure L backets with 4 M3 screws, flat side facing outward, over the holes on the 3D printed screen housing
  5. Unscrew the screws from the riser screws on the touchscreen driver board and set them aside.
  6. Replace the bottom right riser screw with one of the scres from the previous step from the touchscreen driver. This is so it doesn't poke the battery
  7. Remove the top right riser screw.
  8. On your permaboard, create this circuit from the parts you have. You can find the diagram among the Pictures. If you need more detail or if you want to space things out for a better view, download Fritzing and load up the SwitchBerry.fzz file also found in Pictures. You may wish to use a temporary breadboard for testing purposes so you don't have to go through the hassle of desoldering if you messed up. Read ahead to figure out where to place the attached components
  9. The button is going to go right outside the case next to the Powerboost 1000C. It will be secured with velcro. There should be a hole, if not it was probably just filled in during the 3D printing process and you can clear it out with a knife
  10. You may need to hot glue around the LED leads if it's exposed
  11. Place the completed permaboard circuit vertically next to the Pi such that the soldered components are facing the same direction as the Pi's USB ports
  12. Secure the Powerboost 1000C with 1 screw from the touchscreen driver board and another from the Kingwin 80 Piece Assorted Notebook Replacement Screw Kit
  13. Secure the pi in place with 2 screws from the touchscreen driver board
  14. Place a strip of velcro along the wall opposite of the Powerboost 1000C
  15. Place a piece of velcro on the battery and gently press the battery against the back wall
  16. Connect the battery to the Powerboot 1000C
  17. Place the LED between the battery and the Powerboost 1000C
  18. Connect the touchscreen to the Pi by ribbon cable
  19. Connect a 5V GPIO pin to the 5V pin on the touchscreen
  20. Connect a ground GPIO pin to the ground pin on the touchscreen

Setting Up the Software

DISCLAIMER: If you deviated from the hardware listed above, mainly the touchscreen and wifi adapter, this won't work and you'll be on your own. I rely on a touchscreen driver for that specific touchscreen and a wifi driver for that specific dongle. Also, the bluetooth adapter I used is plug-and-play. If you choose a different one, and it's not plug-and-play or doesn't find the Joy-Cons, you're on your own.

  1. Download the latest Raspbian Lite image.
  2. Download Etcher
  3. Write the latest Raspbian Lite image to your SD card with Etcher.
  4. Plug in SD card to Pi
  5. Plug in ethernet cable into Pi
  6. Plug in HDMI cable to Pi and TV
  7. Plug in Pi AC adapter to turn on the Pi
  8. Log in to the Pi with username: pi, password: raspberry
  9. Run sudo raspi-config
    1. Change password
    2. Change hostname if you want
    3. Change locale/timezone/keyboard/wifi region in Localisation
    4. Enable ssh in Interfacing
    5. Disable terminal, enable hardware for Serial in Interfacing
    6. Select Finish
    7. Agree to Reboot
  10. When the Pi comes back to the login screen, login
  11. Run sudo apt-get install -y git
  12. Run git clone https://github.com/drew-wallace/switchberry.git
  13. Run mv switchberry/* ./
  14. Run chmod +x 1-setup
  15. Run ./1-setup
  16. When the Pi comes back to the login screen, login
  17. Run ./2-wifi
  18. When the Pi comes back to the login screen, login
  19. Run ./3-touchscreen
  20. Run ./4-joycons
  21. Run ./5-desktop
  22. Disconnect the HDMI cable.
  23. When the Pi comes back on, it should load the Desktop environment. Tap the terminal icon
  24. Run ./6-parsec username password where username is your e-mail you sign into Parsec with, and password is your Parsec password
  25. For both Joy-Cons:
    1. Long press the Joy-Con sync button until the LEDs start to flash back and forth
    2. Touch the Bluetooth Icon on the taskbar
    3. Tap Add Device
    4. Tap the Joy-Con entry in the list when it pops up
    5. Tap Pair
    6. Tap Ok
  26. Touch the network icon in the taskbar
  27. Touch your WiFi access point
  28. Enter your WiFi access point password
  29. Touch Ok
  30. In the terminal, run sudo reboot

How to use

When you turn on the SwitchBerry, you will end up on the Desktop. There are 4 shortcuts for you to double tap:

  • Keyboard: Opens the onscreen keyboard. This is helpful when connecting to a new WiFi access point
  • LCD Mode: Enables the LCD screen and disables HDMI out. Also enables sound through the headphone jack and disables sound over HDMI
  • HDMI Mode: Enables HDMI out and disables the LCD screen video. Turns the touchscreen into one large touchpad. Also enables sound through over HDMI and disables the sound through the headphone jack
  • Parsec: Starts Parsec and chooses the first available server to stream from
  • Hotcorners:
    • Brightness: Touch the top left corner of the touchscreen. The screen should dim. Drag your finger to the right to increase the brightness.
    • Volume: Touch the bottom left corner of the touchscreen. The volumee should go all the way down. Slowly drag your finger to the right to increase the volume.
    • Exit: Long press for 5sec the top right corner, then release to quite Parsec, close all running scripts, and get back to the desktop.
    • Joy-Con configuration: Long press for 5sec the bottom right corner, the release. The Joy-Cons will begin to flash the LEDs. At that point you can either click L + R to play with both controllers as player 1, or press SL + SR on each controller you want to use individually. The LEDs will indicate which player you are.

The Story

I've always wanted a really cool handheld gaming device. I had a GameBoy, PSP, and Nintendo DS growing up. I really liked the PSP the most because I could mod the heck out of it but also because they had more of the kind of games I like. Then I got into consoles by playing Xbox, Xbox 360, PS3, and now Xbox One. I'm also just now diving into PC gaming. My desire for a handheld console diminished because I enjoyed competitive multiplayer games and other single player and co-op games that I knew a handheld couldn't handle (no pun intended).

One day, Microsoft announced the ability to stream the Xbox One to any Windows 10 device. I was excited! All I had to do was find a small enough tablet and I'd be good to go. But it wouldn't be the same. I'd carry around a tablet, and a controller when I already carried a Surface Pro 3. So I waited again, until I found NVIDIA Game Stream using Moonlight. They had an android app and I had an Android phone. My problem was I didn't have a gaming rig. I was planning on building one but didn't have the money yet. Again, I waited.

Finally, one day I found Parsec. Their focus was on low latency and they supported AMD, Intel, and NVIDIA. My Surface had integrated graphics so I could test it out! It was buttery smooth. I then found out they made a Raspberry Pi version. It got me thinking, could I MAKE a handheld and use this app? I needed to see what other people had done. I found different tips about which Pi to use for mobile projects, what kind of battery life to expect, what screens I could use, but the one big question was the controller. I always imagined having to split an Xbox controller in half and just mounting it on the sides of a screen. I knew that would be difficult and ugly so I was hesitant. Then I saw the Nintendo Switch Joy-Cons. I found a video of some guy playing 2-player with the Joy-Cons in RetroPie. A plan was born.

The idea that I could have a console/PC gaming experience in my hands remained a dream, until now. I went to Microcenter and bought a bunch of parts. I ordered some off Amazon as well. I grabbed the Joy-Cons from Best Buy because no one else around had them in stock at the time. Everything came together except the ability to join the Joy-Cons together as 1 controller. I tried multiple apps desigend for remapping controlls. Even the ones that advertised joining 2 devices as 1 joystick didn't work. I tried modifying the source of another app to get it to work. Nothing was working. Then I found a Joy-Con driver written by Kane York (riking). After getting it to compile, it worked!

Now that it's complete I'm going to start thinking up how to make it smaller and maybe add some features. For example:

  • I want to embed the Joy-Con Charging Grip into my case so the Joy-Cons charge while on the SwitchBerry
  • I want to see if I can drop the Pi 2B for a Pi Zero, but I'm not sure if they make a DSI connector or hat for connecting with the touchscreen. This would be 100% handheld instead of having an option to "dock" it and use HDMI. I would also need a sound solution since it doesn't have a headphone jack
  • Simplify the circuitry into a PCB for space and time saving

Donate

Here's my PayPal

Here's my Square Cash. This wasn't a cheap project by any means. It's too complicated right now to sell, so if you're feeling generous, drop me some cash!

If you don't have Square Cash yet, here's a sweet deal:

Sign up using my code (VCNTKRK) and we’ll each get $5 from Square Cash when you send $5. So if we do the math, you send $5 to me and Square Cash gives you and me both $5. That means I get $10 and you spent $0.

Help

If you have any questions or need some help, join us in the SwitchBerry Discord Server. We'd be glad to help!

About

A guide to setting up the SwitchBerry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published