Showing posts with label Navit. Show all posts
Showing posts with label Navit. Show all posts

Raspberry PI 2 CarPC

online engineering degree/engineering degree online/online engineering courses/engineering technology online/engineering courses online/engineering technician degree online/online engineering technology/electronic engineering online
Hi,

Here are the updates I have recently worked on:
 - Raspberry PI 2 support
 - KODI 14.1
 - linux kernel 3.18.7-v7 with touchscreen drivers(thanks to Chris Coat)
 - radio backend fixed to support RDS RadioText and better RDS StationName
 - interrupts are coming from WiringPI C library instead of Python via sockets
 - new skin from Doru(new Skin Settings page)
 - CarPC folder now lives in /opt/ instead of /home/pi/
 - boot process schematic
 - code is moving to github(https://github.com/bboyandru/)

You can install the build using one of the two tutorials:
 - advanced users guide
 - beginner users guide (thanks to Piero Longega)

Please don't forget about the forum for any comments.

Some screenshots:
Home screen

 
FM radio with RDS

Kodi Settings page

Skin Settings

Skin Settings - Buttons


Enjoy and keep your eyes on the road while driving!



Raspberry PI CarPC January 2015 updates

online engineering degree/engineering degree online/online engineering courses/engineering technology online/engineering courses online/engineering technician degree online/online engineering technology/electronic engineering online

Hi,
Here are the updates I have recently worked on:
 - migration to KODI stable 14.0
 - Raspbian OS from 24 december 2013
 - linux kernel 3.18.1 with touchscreen drivers
 - updates to Radio and Navigation addons

You can install the build using the tutorial link on the right side of the blog. Please don't forget about the forum for any comments.

Enjoy the screenshots and Happy new Year!







RaspberryPI CarPC tutorial

online engineering degree/engineering degree online/online engineering courses/engineering technology online/engineering courses online/engineering technician degree online/online engineering technology/electronic engineering online

1. Installation process(fresh install):
- write a fresh image with the latest RaspbianOS image from http://www.raspberrypi.org/downloads/
- copy the carpc folder in /home/pi/ on the SD card(get the latest release archive from my Downloads page/updates)
- plug the image in RPI, connect an USB keyboard and start it
--- use the auto menu to expand file system
--- change user password
--- enable ssh, disable overscan, disable serial messages
--- change Internalisation Options -> Locale and Timezone to your country
--- expand disk size to at least 4GB
--- enable Boot to Console(mandatory)
- restart
- type cd /home/pi/carpc/ and then ./carpc-install.sh and then wait for the system to install
- after this, you should reboot(sudo reboot) and the system should start

2. Calibrate the touch screen
Forget about xinput-calibrator and X11 calibration metods.
If you have calibration file(/home/pi/touchscreen_axes_calib) from a previous installation you can use it(put it in /home/pi/).
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.

3. Add a map for navigation
Go to Navit Planet Extractor and download a .bin file for your area.
Copy the .bin file in your RPI card in /home/pi/.navit/ folder. Rename the .bin file to map1.bin.

4. Setup the GPS receiver
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:
  1. 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/ttyACM0.
  2. 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.

5. Voice configuration for Navit
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. Add FM Radio module, physical buttons or physical rotary encoders
Here is my hardware schematic containing:
 - SV1 - Raspberry PI B, B+ connector
 - RADIO - SI4703 breakout board
 - RE1 and RE2 - two rotary encoders
CarPC hardware set-up example
Each function of push buttons, rotary encoders can be configured using the Controller, like in the step below.

7. Configure the Controller

Modify the configuration file(/home/pi/config/gpio_description) like in this post.

8. Set the car logo in the Home screen
Put your car logo .png image in /home/pi/config/logo.png.

9. Skin
Thanks to Doru we have CarPC-touch_carbon.

10. Issues
The forum is available for any issues/suggestions.


Have fun!
Andrei

Raspberry PI CarPC September 2014 updates

online engineering degree/engineering degree online/online engineering courses/engineering technology online/engineering courses online/engineering technician degree online/online engineering technology/electronic engineering online
Hello!

I have made some progress on my CarPC project and here are the main changes:
- support for Raspberry PI Model B+
- update XBMC to 13.2 stable
- update kernel to 3.16.0
- reworked radio(rds is available but not yet enabled because of some high cpu usage - will fix this shortly)
- update system available(only ~150MB for download instead of a whole image)
- file system restructuring
- new skin
- forum released(Engineeryng-Diy Forum)

First of all the installation process(this is only for a fresh install, update coming soon):
- write a fresh image with the latest Raspbian from http://www.raspberrypi.org/downloads/
- copy the carpc folder in /home/pi/ on the SD card(gt this folder from my Downloads page/updates)
- plug the image in RPI and start it
--- use the auto menu to expand file system
--- change password to 'a'
--- enable boot into desktop-> Desktop Log in as user 'pi' at the graphical desktop
--- enable ssh, disable overscan, disable serial messages
--- Change Internalisation Options -> Locale and Timezone to your country
- connect a keyboard and open the terminal or connect using ssh
- change user permissions for pi: sudo chmod -R a+rwx /home/pi
- type cd /home/pi/carpc/ and then ./carpc-install.sh and then wait for the system to install
Note! 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.
- after this, you should reboot(sudo reboot)

Calibrate the touch screen
Forget about xinput-calibrator and X11 calibration metods.
If you have calibration file(/home/pi/touchscreen_axes_calib) from a previous installation you can use it.
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.

Add a map for navigation
Go to Navit Planet Extractor and download a .bin file for your area.
Copy the .bin file in your RPI card in /home/pi/.navit/ folder. Rename the .bin file to map1.bin, map2.bin, map3.bin or map4.bin.

Setup the GPS receiver
  1. 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/ttyACM0.
  2. For Serial(UART) modules. The device will have the file name as /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.
Now, copy this file name and put it in the file /home/pi/StartCarPC in the section:
    # Start gpsd
    # /dev/ttyAMA0 - RPI serial port
    # /dev/ttyACM0 - usb port
    sudo killall gpsd
    gpsd /dev/ttyAMA0

Voice configuration for Navit
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.

Configure the Controller
The controller can be easily used with Steering wheel controls or other physical controls in your car.
You can set the configuration file like in this post.

Change the car logo in the Home screen
The car logo is a png file in /home/pi/config/logo.png.

New skin
Thanks to Doru, a new skin is available: CarPC-touch_carbon.

Comments moving to forum
From now on, a forum is available for any issues/suggestions(http://engineeringdiy.freeforums.org/). Due to this, comments on this blog will be disabled.

Have fun!
Andrei

Raspberry PI CarPC April 2014 updates

online engineering degree/engineering degree online/online engineering courses/engineering technology online/engineering courses online/engineering technician degree online/online engineering technology/electronic engineering online
Hello!

I have made a lot of work on the project, with great help from Doru Ignat(idorel@gmail.com) and now the complete list of features is:

  • latest Raspberry PI firmware(which supports new models and has fixes for analog sound - no pops any more, you can use the analog out of RPI)
  • linux kernel 3.10.30 with various touch screens support and also lirc
  • reworked XBMC CarPC skin
  • XBMC 13 Gotham beta3(1080p video support, any music and picture format, support playing from archives and more)
  • reworked XBMC touch screen calibration algorithm
  • XBMC calibration plugin for touch screens(eGalax and others)
  • reworked FM Radio plugin
  • latest Navit build from source
  • fixed Navit to alllow using espeak for speech guidance
  • support for WIFI(Airplay, XBMC remotes)

The latest image can be downloaded from the right side of this blog, from the Downloads page.

Cost of the needed hardware parts: 193$
  - Raspberry PI model B: 45$
  - 7 inch display with touch screen for car reverse: 80$
  - HDMI male to HDMI male golden plated cable: 5$
  - 8GB SDHC card: 6$
  - 5V(2A) micro USB charger: 3$
  - Columbus V800 GPS module(or any other): 37$
  - SI4703 FM Radio breakout board: 13$
  - 2 rotary encoders: 4$

After installing the image on an sd card, you have to configure the system for your needs.

Calibrate the touch screen
The touch screen calibration involves two steps and you need a keyboard connected:
  1. Calibrating the touch screen for X11 applications(like Navit). Open the terminal from Desktop and type xinput_calibrator and follow the indications. After the calibration is completed you have to put the output in a file to make this permanent:
    sudo nano /usr/share/X11/xorg.conf.d/01-input.conf
Put here the output of xinput_calibrator. It will be something like:
    Section "InputClass"
        Identifier    "calibration"
        MatchProduct    "eGalax Inc. USB TouchController"
        Option    "Calibration"    "121 1917 317 1741"
        Option    "SwapAxes"    "1"
    EndSection
  2. Calibrating the touch screen for XBMC. In XBMC use the keyboard to go to Programs/Touch Screen Calibration and follow the informations on screen.
Note, that in order to make a better calibration you can move the finger on screen towards the point, before pressing enter(as can be seen on minute 0:52 in the video).
Touch each point and then press enter to go to the next one. At the end, you have to unplug the touch from usb and then plug it back(works on XBMC Gotham).
After this, he calibration is stored permanently in the file /home/pi/touchscreen_axes_calib. You can edit this file to fine tune the position of the cursor if the calibration isn't perfect.
    calib_x_d and calib_y_d - control the cursor displacement up/down/left/right
    calib_x_fact and calib_y_fact - some factors obtained in the calibration process(don't edit them)
    click_confines - defines the area that will be used for click(if the touch moves outside of this area then a drag action will occur) - this area is measured from the first touched point
    touch_mouse - if you want to use a mouse you have to set this to 0, but some touch screens behave as mouses and you have to set this to 1 in order for them to work(with single click). For the most of the touches this can be 0 if you want to also use a mouse, but if you don't want to use a mouse it doesn't mater, let it be 1.