Differences
This shows you the differences between two versions of the page.
raspberry_boards:duino-pi_modification [2016/01/20 21:48] admin [Install Shutdown & Reset Button] |
raspberry_boards:duino-pi_modification [2020/06/11 22:13] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Paper-Duino-Pi software modifications ===== | ||
- | |||
- | Before start make an update: | ||
- | $ sudo apt-get update | ||
- | $ sudo apt-get upgrade | ||
- | |||
- | ---- | ||
- | |||
- | ==== Change the user and the password ==== | ||
- | |||
- | [[http://raspi.tv/2012/how-to-create-a-new-user-on-raspberry-pi|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. The password is "dernulleffekt". | ||
- | |||
- | 4. Reboot: | ||
- | $ sudo reboot | ||
- | |||
- | ---- | ||
- | ==== Install Shutdown & Reset Button ==== | ||
- | |||
- | 1. Make an folder | ||
- | $ mkdir /home/pi/paper-duino-pi | ||
- | $ cd /home/pi/paper-duino-pi | ||
- | |||
- | 2. Download and unzip that Python script | ||
- | <del>$ wget http://www.dernulleffekt.de/programme/shutdownbutton.py.tar.gz</del> | ||
- | $ wget http://www.dernulleffekt.de/programme/shutdownbutton_02.py.tar | ||
- | $ tar xf shutdownbutton.py.tar.gz | ||
- | | ||
- | 2. Change owner & rights | ||
- | $ sudo chown root:root shutdownbutton_02.py | ||
- | $ sudo chmod 755 shutdownbutton_02.py | ||
- | | ||
- | 3. Create the autostart: | ||
- | $ sudo nano /etc/rc.local | ||
- | write before exit 0: | ||
- | # run reset and shutdown script | ||
- | printf "Starting shutdown aund reset button\n" | ||
- | /home/pi/paper-duino-pi/shutdownbutton_02.py & | ||
- | |||
- | To save and leave press:\\ | ||
- | CTRL+O, Enter, CTRL+X\\ | ||
- | |||
- | 4. Reboot | ||
- | $ sudo reboot | ||
- | \\ | ||
- | |||
- | ---- | ||
- | ==== Install the Arduino IDE & modify ==== | ||
- | |||
- | 1. Install the Arduino IDE, type in command line: | ||
- | $ sudo apt-get installl 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://www.wyolum.com/downloads/alamode-setup.tar.gz | ||
- | unpack it | ||
- | $ sudo tar xf alamode-setup.tar.gz | ||
- | and run the setup. | ||
- | $ cd alamode-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: | ||
- | [[http://wyolum.com/projects/alamode/|Wyolum.com]]\\ | ||
- | |||
- | Here are some details of the [[raspberry_boards:serial_modification|serial modification]]\\ | ||
- | \\ | ||
- | |||
- | ---- | ||
- | ==== Install Pure Data, 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(right-click to paste): | ||
- | 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 | ||
- | \\ | ||
- | |||
- | ---- | ||
- | ==== Download the Firmata ==== | ||
- | |||
- | 1. Create folder | ||
- | $ mkdir /home/pi/pd-sketchbook | ||
- | $ cd /home/pi/pd-sketchbook | ||
- | 2. Download and unpack | ||
- | $ wget http://at.or.at/hans/pd/Pduino-0.5.zip | ||
- | $ unzip Pduino-0.5.zip | ||
- | \\ | ||
- | |||
- | ---- | ||
- | ==== Set the SSH connection ==== | ||
- | |||
- | 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 | ||
- | Change the DHCP in static and add these lines: | ||
- | |||
- | iface eth0 inet static | ||
- | address 192.168.0.111 | ||
- | netmask 255.255.255.0 | ||
- | gateway 192.168.0.100 | ||
- | |||
- | To save and leave press:\\ | ||
- | CTRL+O, Enter, CTRL+X | ||
- | |||
- | 3. Restart ethernet | ||
- | $ sudo ifdown eth0 | ||
- | $ sudo ifup eth0 | ||
- | |||
- | 3. Now you can login on your computer with: | ||
- | $ ssh duino-pi@192.168.0.111 | ||
- | or with XWindows support: | ||
- | $ ssh -XY pi@192.168.0.111 | ||
- | PW: raspberry\\ | ||
- | |||
- | ---- | ||
- | |||