Wear The Raspberry Pi With Screen On Your Arm!

About a month ago, I got an idea to make a touchscreen computer that attaches to the upper arm/wrist. I ordered a PiTFT touchscreen , a battery, and the PowerBoost 500 Charger (battery and charger for making it portable). Then, even before it came in, I wrote a GUI in Python/PyGame. Currently, it has a camera, MP3 Player, picture gallery viewer, and video player (broken).

I had first planned to make the MP3 player the only feature, then I decided adding a camera would be a good idea. After coding the MP3 player (311 lines of code) in a file, I then made a separate file for the main/home screen. I added the camera (73 lines of code) and image viewer (149 lines of code). They were all separate programs, which turned out to be a VERY bad idea.

 Basically, how it would work, is the main screen was a simple PyGame program with barely 100 lines of code, and when you clicked/tapped on one of the icons it would run a console command which ran the right Python program. This is one of the few times it sounds bad in theory but went fairly well in practice. Until, that is, I actually put it onto a Raspberry Pi. Everything on the Pi is about 4 times slower, and had about 8 times less memory then the computer I was working with when making the program.

While opening a new window on top of the main screen had very little delay on the computer I was using, on the Pi it had about a 5 second delay. Not only that, it didn’t work in fullscreen, and used up a lot of RAM with two programs running at once.Finally, I admitted to myself the mistake of what I did, and combined all four programs into a single program, meaning only one display window. This got a much better response, and it has worked out fine.

I did try adding a video/movie player to the Pi, but while the sound played fine, it just couldn’t update the screen fast enough, and it was just too slow. I ordered a Pi 2 (more about that later), which has twice the RAM, and I may fix the video player later. I was actually able to run the GUI in fullscreen without starting booting to the desktop, which means that a lot less RAM is used up.Some really cool features; to update the program, I use Dropbox.

I update the program on the computer, then I upload it to a special folder on Dropbox. Then, on the main screen of the Pi, there is a button which checks for a newer version of the program on Dropbox. It one is found, it uses it and restarts the program. Another great feature is the one for putting music onto the Pi.

All you have to do it plug a USB stick into the Pi, then tap a button on the MP3 player screen, and it will copy all music from the USB stick to the music list. I also added a feature which would upload pictures from the gallery to Dropbox. I will be 3D printing a case for it soon, but I need a heat bed first. After it looks good enough to boast about, I’ll probably do a video about it.

Leave a Reply

Your email address will not be published. Required fields are marked *