arduino Raspberry Pi project

Raspberry Pi Openbox Desktop

by Lewis Loflin

YouTube video Raspberry Pi, Arduino, and Learning Linux.

Update: I will no longer use PiBang which has gone down. The system was based on Rasbian Wheezy so I switched it to use Wheezy repositories.

The Raspberry Pi 2 is a game changer - with twice the memory and six times the power we have the basis for a mini personal computer. Everything used before will still work on the latest Rasbian for Pi 2 which will also work on the earlier slower Model B.

In this project we will use the Rasbian distribution for Raspberry Pi to construct a fully functional and fast Linux operating system. This is not aimed at the professional Linux or ARM programmer, but for universal use by the average person. This is not a child's toy and I won't have the kiddie software such as Scratch.

Related to this are a number of projects using the IBM PC printer port that can be easily ported over to Raspberry Pi. More on that here. Both use Python as an operating system. The following was developed for that project and ported to Raspberry Pi. They are designed to allow low-level electronics to be operated by Arduino while Raspberry Pi performs high level functions.

Raspberry Pi is available from a number of vendors on Ebay. ( I've had some serious problems in the past with unknown Chinese Ebay vendors and would stick with reputable companies such as Newark Electronics. (

Issues with the older Raspberry Pi Model B

The Raspberry Pi based on a 700 mHz Arm processor and with 512k of RAM in the newer model B, 256k in the older model A. The idea that this can be a media center or web server in any practical terms is nonsense.

Its web browser Midori can hardly operate and is very slow - I use Dillo as an alternative for general viewing. In addition the official Raspbian Wheezy lacks an audio system with most files missing and is a pain to install.

Update: the new Rasbian for Pi 2 includes Dillo but also includes Netsurf (not in the menu). That is fast like Dillo but is more functional including the ability to "cut and paste" text, something lacking in Dillo. That will be my general browser. The Epiphany is defective and I replaced that with Midori.

Update: the new Rasbian has the sound system (ALSA) installed and the volume can be controlled via alsamixer on the command line from a terminal. That is also not in the LXDE menu.

Based on the LXDE desktop while "lite" compared to say Gnome is still bloated and slow for this system. With that in mind I'm using what I learned with Puppy Linux and Damn Small Linux when all I had was low-end, obsolete computers.

What I've ended up using was either JWM, Fluxbox, or Openbox combined with the Rox-Filer file manager and the Rox pinboard for desktop and icons. On average the system with consumes only 5 percent or less of system resources, which make operating other programs faster..

Update: make that 1 or 2 percent of CPU power with the Raspberry Pi 2. They also only use about 50 megabytes of the 1000 megabytes of memory!

One will need heat sinks on the two main ICs on the Raspberry Pi. They do get hot. I strongly suggest using a powered USB hub of at least 2 amps. Connect one cable to the lower USB port of the RPi, but also connect another USB cable from the hub to mini USB to the RPi's power input. While some claim one can power RPi through the USB port, I don't recommend that. One can also connect their mouse and keyboard to the hub.

If one can program their own SD card, besides being at least 8 gigabytes get a high speed card. With prices (June 2014) so low on SD cards it makes no sense to go with anything less than 8 gigabytes. There is a notable difference in programming speed and operation with a better grade SD card. On the open USB port on the RPi I'd use a USB thumb drive for storing stuff. I never bothered using a wireless "dongle" I think it's called.

Raspberry Pi protoyping

If one plans to do electronics prototyping get a cable that connects to a separate proto board adaptor. That's safer and easier to use than trying to connect directly to the GPIO pins. The GPIO connection has both 5-volt and 3-volt connections, do not connect 5-volts to any of the other GPIO pins or the RPi can be damaged.

I'll be connecting a DS1307 RTC to operate as the RPi's hardware clock, which it lacks. All other electronic control functions will be through a separate Arduino or PIC controller. Yes we can blink some LEDs and detect switches with the GPIO pins.

If using LXDE one can download JWM, Fluxbox, or Openbox and have multiple systems installed and select the one you want. I'll show how to select from multiple desktops.

Setting up Openbox for Raspberry Pi Here we look at what is installed on Raspberry Pi PiBang and add some things to the default Openbox menu. See YouTube video.

Raspberry Pi Linux Permissions-Program Installations Here we set permissions to enable us to install more programs and configure the system.

Connecting DS1307 RTC to Raspberry Pi We setup I2c, Python, and a Ds1307 real time clock module.

Raspberry Pi Window Manager Control with Xinitrc Here we learn how to install additional window managers such as JWM and Fluxbox.

Setup Fstab, Symbolic Links Learn how to access an external drive, make symbolic links, and take screen shots. See YouTube video.

Any questions, corrections, or ideas please feel free to contact me. I'm next going to be adding a series of electronics projects with an Arduino slave and Raspberry Pi. Have fun!