The Legend of the Headless Pi

Hello World!

Hope you have all been doing well in this bizarre time. UC Davis has been incredibly nice and decided to allow us to take all our classes pass/fail this quarter! Typically, we are only allowed to take pass/fail courses that are not a part of our major, and since I’m an engineering major, I don’t have any room for classes that are not a part of my major. This is allowing me to take it easier with my classes and focus more on my Amazing Headless Raspberry Pi!


A Raspberry Pi is an extremely simple computer that you can program and connect to circuit boards. Typically, you attach a screen, mouse, and keyboard to the pi. However, if you don’t want to, you can make it run ‘headless’. This means that it will haunt the nights searching for its lost monitor and keyboard! Also, it means that rather than communicating through a monitor, you just talk to it through your computer. I decided to do that since the whole purpose of this project is to allow astronauts to control a third arm while in space, so it should be lightweight. So in order to communicate with the PI through my computer, I had to SSH into the PI. SSHing is very simple — you type the name of the PI into your computer terminal, and you get access to the PI’s command line interface. It looks like this:

ssh terminal

If you like, you can learn more about how to set up a headless Raspberry Pi here.

But there was one problem: I wanted to use an app called PyoConnect to connect to the MyoBand (you can learn about the MyoBand from my previous posts). PyoConnect is what Thalmic Labs, the people who make the MyoBand, recommend when you are trying to connect to a MyoBand using Linux. Luckily I got help from one of my programming friends, who recommended that I use X11 forwarding!

X forwarding (you can learn more about it here) is basically a way to get a graphical user interface (GUI) to run over SSH. It works really well!

x-forward screen

So that’s what my computer screen looks like when SSHing into my headless pi! I’ve got the standard Raspbian desktop, and can control the PI like I could with a monitor and keyboard. You can also see the terminal that is SSHing into the Pi, but that Pi is part of the Mac, not the Pi itself. You can also open up a terminal on the Pi if you want, but that’s separate. Weirdly enough, you can still see the Mac top bar running XQuartz, the app that lets you X forward! Also, for whatever reason you can see the items on my Mac desktop? I don’t know how that works. But those documents are part of my regular computer, not the Pi.

I then spent the rest of my research time working on how to get the Myoband to run on the Pi. See unfortunately, there is truly no hell worse than the hell of other people’s hacky code. And the PyoConnect code was really really hacky. So I’d connect the band, everything would work perfectly, and then it would disconnect. I tried to use another code repository, but that had the same issue. Perhaps there is something wrong on my end? I’m honestly not sure but I’m going to keep trying to figure it out! I reinstalled everything, and eventually ended up reinstalling Raspbian (so everything above I ended up doing twice over) but it still does not work. I am open to any all all suggestions in the comments!

EDIT: A few hours after posting this, I figured it out! Python, the language I was programming this in, has several different versions that are being used. Python 3 came out in 2008, which is long before PyoConnect was written. Strangely enough however, the code was written in Python2.7! This is surprisingly common — more ‘modern’ applications run with Python 2.7 than I would normally expect, and I’m not really sure why! Anyways, PyoConnect requires several additional python libraries (libraries are basically extra code that some apps need to run) to be installed. I installed them so they were only usable when running Python 3! So I fixed it and now it runs well!

pi case
My pi in its case

Now as you can see, my Raspberry Pi is currently living in its Canakit case. It’s a lovely case, but a tad boring. So I decided to seek aid from DBrand. DBrand sells cases and skins for computers, and I wanted to see if they would be willing to skin a Pi. They don’t currently sell Pi skins, but sometimes if enough people ask, they’ll skin your device. They have a reputation for being extraordinarily rude to their customers, but also sometimes funny and nice. I decided to take a shot at provoking their ire and in the email, I wrote: I am a computer science and engineering major at UC Davis. I work all the time and my life sucks. I recently got a job at BEAR labs on campus where they don’t pay me and I write code. The work involves a raspberry pi. If I could put skin on the raspberry pi, I might be able to look at the pi and be kinda happy for a bit before going back to work and being sad all the time. They responded: Hey Mira! …You do realize that the Raspberry Pi is sold as a bare circuit board, right? We’re not going to skin a bare circuit board, and there are so many cases for the Pi that it’s not really an option to skin those either. That said, if you’re feeling handy, try buying a few AirPower skins. You shouldn’t have any problems getting at least the top and bottom of any case covered with that, though you might have some trouble ensuring that the sides line up. If you just want the easy way out, get a Razer Blade 17″ Top skin with no logo. That’s the largest skin we sell without any cutouts, and it will be more than enough to get the whole thing covered. Just make sure you don’t cover any ventilation holes, or you’ll end up with a very baked Pi. Let us know if there’s anything else we can help with and have a great day!

skinned case

Airpowers, if you remember, are the device that apple was going to sell but was canceled. DBrand took this opportunity to make a skin for a nonexistant product! They sell the skins for relatively cheap (4.01$) and they are essentially their skin for everything they don’t specifically sell for. So I bought one of their skins, and this is now what my pie looks like! There’s a lot of skin left over that I might be able to use for the bottom of the pi, or maybe even some other piece of tech that I have! I didn’t do the best job with the ventilation holes, but what am I, an artist? Anyways, now even if my Pi doesn’t work at all, at least it will look nice!

skinned case

DBrand was actually quite nice, and rather than insulting me they sent me this lovey message on a sticky note that came along with the skin! Question: how did they get printed letters on a sticky note? Do they have some sort of sticky note printer and if so, how on earth does it not get jammed up? Well anyways, thank you for your wisdom Robot 180! Certainly some advice we could all use!

May you be ever victorious in your future endeavors! Especially if you are dzhu or Fernando Cosentino, thank you so much for writing PyoConnect!