Beginner Tutorial

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

1

Installation process
1.1 Download raspbian from http://www.raspberrypi.org/downloads/

1.2 write a fresh image with the latest RaspbianOS image from

1.2.1

Windows user

1.2.1.1 Insert the SD card into your SD card reader and check which drive letter was assigned. You can easily see the drive letter (for example G:) by
looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap SD adaptor in a USB port.
1.2.1.2 Download the Win32DiskImager utility from the Sourceforge Project page (it is also a zip file); you can run this from a USB drive.
1.2.1.3 Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as administrator. Right-click on
the file, and select Run as administrator.
1.2.1.4 Select the image file you extracted above.
1.2.1.5 Select the drive letter of the SD card in the device box. Be careful to select the correct drive; if you get the wrong one you can destroy your
data on the computer's hard disk! If you are using an SD card slot in your computer and can't see the drive in the Win32DiskImager window,
try using a cheap SD adaptor in a USB port.
1.2.1.6 Click Write and wait for the write to complete.
1.2.1.7 Exit the imager and eject the SD card.
1.2.2

Linux user
Please note that the use of the dd tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you
could delete your primary Linux partition. Please be careful.
1.2.2.1 Run df -h to see what devices are currently mounted.
1.2.2.2 If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your
computer.

1.2.2.3 Run df -h again. The new device that has appeared is your SD card. The left column gives the device name of your SD card; it will be listed as
something like /dev/mmcblk0p1 or /dev/sdd1. The last part (p1 or 1 respectively) is the partition number but you want to write to the
whole SD card, not just one partition. Therefore you need to remove that part from the name (getting, for example, /dev/mmcblk0 or
/dev/sdd) as the device for the whole SD card. Note that the SD card can show up more than once in the output of df; it will do this if you
have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition.
1.2.2.4 Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are
copying over the SD image.
1.2.2.5 Run umount /dev/sdd1, replacing sdd1 with whatever your SD card's device name is (including the partition number).
1.2.2.6 If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of
these partitions.
1.2.2.7 In the terminal, write the image to the card with the command below, making sure you replace the input file if= argument with the path to
your .img file, and the /dev/sdd in the output file of= argument with the right device name. This is very important, as you will lose all data
on the hard drive if you provide the wrong device name. Make sure the device name is the name of the whole SD card as described above,
not just a partition of it; for example sdd, not sdds1 or sddp1; or mmcblk0, not mmcblk0p1.
dd bs=4M if=2015-02-16-wheezy-raspbian.img of=/dev/sdd
1.2.2.8 Please note that block size set to 4M will work most of the time; if not, please try 1M, although this will take considerably longer.
1.2.2.9 Also note that if you are not logged in as root you will need to prefix this with sudo.
1.2.2.10
The dd command does not give any information of its progress and so may appear to have frozen; it could take more than five minutes to
finish writing to the card. If your card reader has an LED it may blink during the write process. To see the progress of the copy operation you
can run pkill -USR1 -n -x dd in another terminal, prefixed with sudo if you are not logged in as root. The progress will be displayed in the
original window and not the window with the pkill command; it may not display immediately, due to buffering.
1.2.2.11
Instead of dd you can use dcfldd; it will give a progress report about how much has been written.

1.2.2.12
You can check what's written to the SD card by dd-ing from the card back to another image on your hard disk, and then running diff (or
md5sum) on those two images. There should be no difference.
1.2.2.13
Run sync; this will ensure the write cache is flushed and that it is safe to unmount your SD card.
1.2.2.14
Remove the SD card from the card reader.
1.3 download carpc image from https://drive.google.com/folderview?id=0B__Rs5JF53-kOHhDODJENVFkNmM&usp=drive_web&tid=0B__Rs5JF53kVk03SGQ5OWY4Z0k take the last update

1.3.1

unzip and copy the carpc folder in /home/pi/ on the SD card, windows users must download a sw to read/write linux partition

1.4 plug the image in RPI, connect an USB keyboard, mouse, Ethernet (router must be set to dhcp) and start it (plug power cable)

1.5 raspberry Pi software configuration tool

1.5.1

use the auto menu to expand file system

1.5.2

change password to 'a'

1.5.3

change Internalisation Options -> Locale and Timezone to your country

1.5.4

overclock to maximum

1.5.5

advance options -> enable ssh, disable overscan, disable serial messages

1.5.6

Finish

1.6 open LXTerminal

1.6.1

change user permissions for pi: sudo chmod -R a+rwx /home/pi

1.6.2

type cd /home/pi/carpc/ and then ./carpc-install.sh and then wait for the system to install
If you get Cannot mkdir: Permission denied running this script then you should type sudo chmod -R a+rwx /home/pi/carpc/ and then run the script
again.

1.6.3

Waiting installation completed (Ethernet must be on & dhcp)

1.6.4

Type sudo reboot

1.6.5

Kodi autostart

Calibrate the touchscreen


2.1 If you have calibration file(/home/pi/touchscreen_axes_calib) from a previous installation you can use it(put it in /home/pi/).
2.2 If you don't, then use the touch screen calibration plugin. This plugin works if you set correctly the Raspberry PI resolution in /boot/config.txt. Follow the steps
in this video.

Configure Navit
3.1 Add Map

3.1.1

Go to Navit Planet Extractor and download a .bin file for your area

3.1.2

Type ctrl+h to show hidden file/folder

3.1.3

Copy the .bin file in your RPI card in /home/pi/.navit/ folder. Rename the .bin file to map1.bin.

3.2 Change show locale


3.2.2

open /home/pi/navit/navit/navit.xml
search for <config xmlns:xi="http://www.w3.org/2001/XInclude" language="ro_RO">

change the ro_RO to your locale (example, I'm from Italy so I have language= "it_IT"
4

Setup GPS
4.2 Open the file /home/pi/startup/StartCarPC and find the line gpsd /dev/ttyAMA0
Replace /dev/ttyAMA0 with your gps device file name. Here is how to find the file name:
4.2.2

For USB devices. After plugging the device into the usb port type dmesg and you should see somewhere that a new device was mapped on /dev/tty... Most
probably the file name would be /dev/ttyUSB0

4.2.3

For Serial(UART) modules, using UART TX/RX pins the device will have the file name /dev/ttyAMA0.
You can test that the device is connected to a file name by calling cat /dev/ttyAMA0, for example and you should see some NMEA output.

Voice configuration for Navit

5.1 Each time a road indication has to be made, Navit will execute the file /home/pi/.navit/speech.sh with the indication text. This file will play a sound and the speak the
indication, through speakers.
aplay -r 44100 /home/pi/.navit/notification3.wav & sleep 0.7 && espeak -ven+f4 -s150 -a 150 -p 50 "$1" --stdout | aplay
/home/pi/.navit/notification3.wav - the sound that will be played each time before an indication
-ven+f4 - female voice number 4
-s150 - speed 150 words per minute
-a150 - amplitude
-p50 - pitch
You can find more settings in the espeak manual
If you don't want the voice guidance you can press the speaker button in Navit and it will be turned off.
6

Set the car logo in the Home screen

6.1 Put your car logo .png image in /home/pi/config/logo.png


some logos https://drive.google.com/folderview?id=0B_DSiIh57UI-dU5xVjkxTTItTHM&usp=sharing#grid
7

Skin

7.1 Thanks to Doru we have CarPC-touch_carbon.


8

WIFI

After install carpc the wlan stop to work, you must reinstall the firmware of your wifi dongle
on terminal sudo apt-get remove firmware-ralink
sudo apt-get install firmware-ralink or remove/install firmware-atheros

ENJOY WITH YOUR RASPBERRY CARPC


Thanks to Andrei Istodorescu for the great job

This guide was made by Longega Piero [email protected]

Last update 03.09.2015 ver 1.1

You might also like