arduino Raspberry Pi project

Getting Started with Raspberry Pi

by Lewis Loflin

Update May 2015: I'll no longer be using the BiBang distribution but instead the official Rasbian Wheezy that works on the Raspberry Pi model B and the new raspberry Pi 2.

In this section we will install most of our software. This project will have multiple sections for learning Linux and electronics. For the project main page see Build Your Own Raspberry Pi Arduino System

Also see Setting up Openbox for Raspberry Pi.

I tried other distributions from the free DVDs included with various Linux magazines and found a number of problems being simply slow and frustrating to work with. I did take the official Raspbian and upgraded it to a fast and lite system complete with audio and using both Fluxbox, JWM and Openbox. All are light weight and faster compared to the original LXDE.

Debian seems to me to be the most popular being the basis of Ubuntu and many other distributions. They do have some quirks about Open Source, but when used through Ubuntu, Crunchbang, etc. that problem is bypassed.

On raspi-config boot to command line. Make sure to put in a root password such as raspberry. The keyboard is default US. Important: On the selection "boot_behavior" or going right to the desktop select no, we want to go to the command line. This can setup in the terminal window as root.

Note: the official Rasbian defaults to the British keyboard so if American make sure it's corrected.

ht need a root password if in the raspi-config menu.

Update: In the new Rasbian set "yes" for i2c and spi.

Go to finish and reboot. It will come back and enter root for user then the root pass word you setup earlier.

Update: there is no root as such in the new Raspbian but sudo permissions are setup so there is no need for passwords. You still mig

A quick note on Linux files. Any file with "." in front of it is a hidden file. Many configuration and control files/folders in the home directory are hidden. In your file manager set that to display hidden files. From the command line see those hidden files and directories:

~ $ ls -a

To set up file permissions and sudo see Setup Permissions, FSTAB, Symbolic Links, Screen Shots

What to install

Welcome back. Let's update the system before we begin - do the following:

~ $ sudo apt-get update && dist-upgrade

Then download the following - this will take a while.

~ $ sudo apt-get install arduino rox-filer geany dillo x11-apps locate apt-file gtk+-2 libasound2-dev jwm menu fluxbox feh openbox, obmenu netsurf

Note some of the above may already be installed!

One will have to download from my website Debian packages I made for Beaver text editor and Viewnior image viewer. These are optional but work faster or are more functional.

Leafpad is OK for general text files while Beaver is much better for programming. It's much more functional than leafpad and far faster and less "bloated" consuming less system resources than Geany.

The PiBang (and Rasbian but isn't in the menu) system already has an image viewer Gpicview but from my website we will install Viewnior. Viewnior is much faster and less bloated than Gpicview and consumes one-third the system resources. We are working for a fast flexible system and still have access to the other files if needed.

Zmixer is a fast ALSA volume control used with Puppy Linux and I've used it on Raspberry Pi, Debian, and Slackware. (Command line alsamixer is in the Rasbian for RPi 2.)

Lxterminal is a great terminal program that will allow one to cut and paste, bookmark, etc. besides being lightweight and fast. It comes with Rasbian.

Rox-filer is a fast "drop and drag" file manager used in Puppy Linux and Damn Small Linux. In addition to being a file manager it creates a "pinboard" for icons and links across the system. Rox-Filer is highly configurable and super fast, opening in less than a second.

The Rox-Filer pinboard is great for displaying icons on those window managers such as JWM, Openbox, Fluxbox that don't directly support icons. Like Rox-Filer it's a simple drop-drag solution for folders, links, and files.

Dillo is best used for fast webpage browsing and unlike MIdori that comes with both Raspberry Pi distributions opens in less than a second. This along with Beaver were ported over from Damn Small Linux. (Dillo is installed in the new Rasbian as is Netsurf a better replacement for Dillo)

Lxmusic is better for audio files and consumes less resources. (I'll no longer use LXmusic but will instead use XMMS which isn't in the Rasbian repositories.)

As an alternative one can get Alsa Player:

~ $ sudo apt-get install alsa-oss alsaplayer mpg321 alsaplayer-alsa alsa-base

To update locate:

~ $ sudo updatedb

Locate replaces find in that it makes a list of file in the system for faster search. Finding the package that contains a particular file for Debian is easy. First install apt-file if one hasn't already:

~ $ sudo apt-get install apt-file

Then the first time, you need to download the files index with the data for your Debian system:

~ $ sudo apt-file update

Finally, you can use apt-file to find the package. For example with alsa/asoundlib.h

~ $ apt-file search alsa/asoundlib.h
~ $ libasound2-dev: /usr/include/alsa/asoundlib.h

That is how I located a needed file libasound2-dev for Zmixer.



YouTube Videos:
MCP4725 12-Bit DAC Interface to Raspberry Pi
ADS1115 4-Channel ADC Uses I2C with Raspberry Pi
Interface I2C LCD to Raspberry Pi in C
Pulse-Width-Modulation with Raspberry Pi
Using Geany Text editor C Programming
Raspberry Pi Blink Demo
MAX6675 Raspberry Pi Demo

Videos:
Raspberry Pi, Arduino, and Learning Linux
Raspberry PI Arduino Advanced Interface
Tkinter with Raspberry Pi and PCF8591 AD-DA Sensor

Linux Videos

Live Linux Distro for Using Printer Port with Electronics
Using the powerful Rox-Filer system in Linux
Use FEH under Linux for a Wallpaper Setter
How to create Symbolic links in Linux