Table of Contents

Embedded Artist Image Modifications for Raspbian Wheezy

These modifications work with the Raspberry Pi B and B+. Download and burn the Raspbian Wheezy 2014-09-09 Image:
https://www.raspberrypi.org/downloads/raspbian/
Boot you Rasperry Pi and log in…
user: pi
pass: raspberry
… and make an update:

$ sudo apt-get update
$ sudo apt-get upgrade

Name and Password

Change the name and the password.
How to create a new user 1. Change the name:

$ sudo nano /etc/hostname

in “duino-pi”

2. Change the host file

$ sudo nano /etc/hosts

in:

  127.0.0.1       localhost
  ::1             localhost ip6-localhost ip6-loopback
  fe00::0         ip6-localnet
  ff00::0         ip6-mcastprefix
  ff02::1         ip6-allnodes
  ff02::2         ip6-allrouters
                            
  127.0.1.1       duino-pi

5. Change the password

$ passwd

The passwd command allows you to change your password, you will be prompted for your old password, then you new password twice.

4. Reboot:

$ sudo reboot

Script

Install the Shutdown/Reset Button and the Blink Program as startup programs.

1. Make an folder

$ mkdir /home/pi/paper-duino-pi
$ cd /home/pi/paper-duino-pi

2. Download and unzip the shutdown script

$ wget http://www.dernulleffekt.de/programme/shutdownbutton_02.py.tar
$ tar xf shutdownbutton_02.py.tar

2. Download and unzip the blink script

$ wget http://www.dernulleffekt.de/programme/blink_02.py.tar
$ tar xf blink_02.py.tar

2. Change owner & rights

$ sudo chown root:root shutdownbutton_02.py
$ sudo chmod 755 shutdownbutton_02.py
$ sudo chown root:root blink_02.py
$ sudo chmod 755 blink_02.py

3. Create the autostart:

  $ sudo nano /etc/rc.local

write before exit 0:

 # run reset and shutdown script
 printf "start shutdown aund reset button on GPIO 22\n"
 /home/pi/paper-duino-pi/shutdownbutton_02.py &
 # start blinking
 printf "start blinking on GPIO 27\n"
 /home/pi/paper-duino-pi/blink_02.py &
 

To save and leave press:
CTRL+O, Enter, CTRL+X

4. Reboot

$ sudo reboot



Arduino

Install the Arduino IDE and the Paper-Duino-Pi modifications.

1. Install the Arduino IDE, type in command line:

$ sudo apt-get install arduino

2. For the modification of the GPIO Pin and the Avrdude, the easiest way is to download the setup for the AlaMode board:

$ wget http://dernulleffekt.de/programme/paper-duino-pi-setup_02.tar.gz

http://git.io/alamode-setup
unpack it,

$ sudo tar xf paper-duino-pi-setup.tar.gz

and run the setup.

$ cd paper-duino-pi-setup
$ sudo ./setup

That will install a new version of the avrdude and will also do some Linux modifications (one for the alamode board).

3. To modifier the Arduino IDE setup for the Paper-Duino-Pi you have to type in the terminal:

$ sudo nano /usr/share/arduino/hardware/arduino/boards.txt

Change the name of the board:

   alamode.name=Paper-Duino-Pi

The baud rate should be set to 57600:

   alamode.upload.speed=57600

Than change the fuses from 0xde to:

   alamode.bootloader.high_fuses=0xda

and save it!

4. Reboot

$ sudo reboot

After resetting the Raspberry Pi a new serial port: dev/ttyS0 and a new board: Paper-Duino-Pi will appear in your Arduino IDE. For uploading a program use the Paper-Duio-Pi board and the ttyS0 port.

Thanks for the avrdude modification to: Wyolum.com

Here are some details of the serial modification


PD-extended

1. To install pd-extended run the following command in your terminal:

$ sudo nano /etc/apt/sources.list 

copy/paste this line to the list:

deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi 

To save and leave:
CTRL+O, Enter, CTRL+X

2. Update

$ sudo apt-get update

3. Download pd-extended

$ wget https://puredata.info/downloads/pd-extended-0-43-3-on-raspberry-pi-raspbian-wheezy-armhf/releases/1.0/Pd-0.43.3-extended-20121004.deb 

4. Install the package

$ sudo dpkg -i Pd-0.43.3-extended-20121004.deb 

5. Fix the installation

$ sudo apt-get -f install 

it should be installed.

6. Change the root priorities:

$ sudo chmod 4755 /usr/bin/pd-extended

7. Download the Firmata: Create a folder…

$ mkdir /home/pi/pd-sketchbook
$ cd /home/pi/pd-sketchbook

Download and unpack the firmata:

$ wget http://at.or.at/hans/pd/Pduino-0.5.zip
$ unzip Pduino-0.5.zip



Sound on Jack

Enable the Sound on Jack.

$ sudo modprobe snd_bcm2835
$ sudo amixer cset numid=3 1

or change in

$ sudo raspi-config

Advanced Options/Audio


Stop blanking

Disable blanking the text terminals.

$ sudo nano /etc/kbd/config

Change:

BLANK_TIME=0
POWERDOWN_TIME=0

Python Modules

Install the Python Modules for Python 2.7.

$ sudo apt-get update
$ sudo apt-get install python-pip

install python Serial:

$ sudo apt-get install python-serial

install python OSC:

$ sudo pip install pyosc

install python pi cam

$ sudo apt-get install python-picamera
$ sudo raspi-config
-> enable camera

install python 3D: https://github.com/tipam/pi3d

$ sudo pip install pi3d
$ sudo raspi-config
-> gpu_mem=128
$ sudo nano /etc/apt/sources.list 

copy/paste this line to the list

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
$ sudo apt-get update
$ sudo apt-get install python-pil
$ sudo nano /etc/apt/sources.list 

remouve this line from the list again:

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi

install python omxplayer:
copy from:
https://github.com/dernulleffekt/embedded-artist/tree/master/python

pyomxplayer.py
pyomxplayer.pyc

in:
/usr/local/lib/python2.7/dist-packages


SSH

Set the SSH connection and the IP address.

1. For activating the SSH connection open

$ sudo raspi-config

In 8. Advanced Options you can activate SSH

2. Give the Raspberry Pi an IP address. Open the interfaces file:

$ sudo nano /etc/network/interfaces

Add these lines after “face eth0 inet dhcp”:

   auto eth0:1
   iface eth0:1 inet static
     address 192.168.0.111
     netmask 255.255.255.0

To save and leave press:
CTRL+O, Enter, CTRL+X

3. Restart ethernet

$ sudo ifdown eth0:1
$ sudo ifup eth0:1

3. Now you can login on your computer with:

$ ssh pi@192.168.0.111

or with XWindows support:

$ ssh -XY pi@192.168.0.111

PW: raspberry


FAT32 Partition

With G-Part make a fat32 partition on the SD Card, named “fat32”.

$ sudo mkdir /home/pi/fat32
$ sudo blkid
/dev/mmcblk0p3: LABEL="fat32" UUID="BC16-DD42" TYPE="vfat" 
$ sudo nano /etc/fstab

edit:

/dev/mmcblk0p3  /home/pi/fat32  vfat    utf8,umask=022,uid=pi,gid=pi  0       0

$ sudo mount -a


Camera LED

Disable the Camera LED.

$ sudo nano /boot/config.txt

edit:

disable_camera_led=1

Omxplayer

To prevent the OMXPlayer to show the time and “pause” one have to downgrade it to version 0.2.7.

$ sudo apt-get autoremove omxplayer
$ sudo apt-get install libpcre3 fonts-freefont-ttf 
$ wget http://omxplayer.sconde.net/builds/omxplayer_0.2.7~git20130615~d87aa60a_armhf.deb
$ sudo dpkg -i omxplayer_0.2.7~git20130615~d87aa60a_armhf.deb
$ rm omxplayer_0.2.7~git20130615~d87aa60a_armhf.deb