Table of Contents

Embedded Artist Image Modifications for Raspbian Jessie Lite

These modifications work with the Raspberry Pi 2 B. Download and burn the Raspbian Jessie Lite 2015-11-21 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

New Password

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.

$ 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 und reset button on GPIO 22\n"
 /home/pi/paper-duino-pi/shutdownbutton_02.py &
 # start blinking
 printf "start to blink on GPIO 27\n"
 /home/pi/paper-duino-pi/blink_02.py &
 printf "  \n"
 printf "    =============================================\n"
 printf "    =             PAPER-DUINO-PI                =\n"
 printf "    =                                           =\n"
 printf "    =          wolfgang spahn 01-2016           =\n"
 printf "    =         http://dernulleffekt.de           =\n"
 printf "    =============================================\n"
 printf " \n"
 

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.

Install the Arduino IDE, type in command line:

$ sudo apt-get install arduino

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://www.wyolum.com/downloads/alamode-setup.tar.gz
unpack it,

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

and run the setup.

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

That will install a new version of the avrdude and will also do some Linux modifications (one for the alamode board). Ignore the inittab warnings (systemd is the new initd)

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.
Sometimes the first upload won't work because the resetpin is set low from high but wasn't high at all. But than it is set high and the second upload will work.

Thanks for the avrdude modification to: Wyolum.com

Here are some details of the serial modifikation (still for initd and not for systemd)


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 and unpack the Firmata: Create a folder…

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

Download the firmata:

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

or:

$ wget http://dernulleffekt.de/programme/Pduino-0.5.tar.gz
$ tar xf Pduino-0.5.zip

Now, one can upload the standardfirmata to the Arduino or the Paper-Duino-Pi and with the arduino-test patch in PD one has access to all in- and output pins.


Sound on Jack

change the audio output 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

Or add in:

$ sudo nano /etc/rc.local 
setterm -blank 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 pyOSC:
$ sudo pip install pyosc

$ wget https://pypi.python.org/packages/source/p/pyOSC/pyOSC-0.3.5b-5294.tar.gz
$ tar -xvf pyOSC-0.3.5b-5294.tar.gz
$ cd pyOSC-0.3.5b-5294/
$ sudo ./setup.py install

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 apt-get install python-pil

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

$ sudo wget https://github.com/dernulleffekt/embedded-artist/archive/master.zip
$ unzip master.zip
$ cd embedded-artist-master/python/
$ sudo cp pyomxplayer.py /usr/local/lib/python2.7/dist-packages/
$ sudo pip install pexpect

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.211
     netmask 255.255.255.0

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

3. Reboot

$ sudo reboot

3. Now you can login on your computer with:

$ ssh pi@192.168.0.211

or with XWindows support:

$ ssh -XY pi@192.168.0.211

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 the camera LED
disable_camera_led=1

Omxplayer

$ sudo apt-get install 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://dernulleffekt.de/programme/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


Others

 $ sudo apt-get install htop idle git tcpdump
 

—-