Real-Time traffic state with Raspberry Pi in your car
– The goal
This will help to see the state of roads, in live, just need to load your favorite (urban or not) traffic map.
– The screen
I have found a nice screen on ebay for ~18€, a 3.2″ TFT LCD Touch Screen, cheap and small is ideal.
– Installing raspbian-DVK512-12040725.img
To use the touch screen, we run under a Raspbian distribution, you can download the image file here already configured to work with the XPT2046 LCD Control (most common 3.2 TFT found on ebay) . Extract the image file on a 2Gb mini SD Card, and run the setup config.
– Calibrate the screen
Go to Preferences, Calibration Touchscreen, follow the instructions.
– The data connection
I have a Samsung S4 Mini cell phone, the raspberry-pi will use the router function (Wifi) to download the data through LTE/4G network. Use a cheap USB Wireless Nano Dongle (WiFi Adapter), around 3$ on ebay. Plug the dongle, there is no need additional drivers, run wpa-gui-wireless to reach your network wifi from your phone.
– Configuring LXDE to start the Midori browser on login (with your favorite road traffic map)
Connect your Raspberry to your local network through Eth link, grab the Ip address, and and log-in using Putty. Then:
Edit the autostart file:
sudo nano /etc/xdg/lxsession/LXDE/autostart
Comment out everything using a ‘#’ at the start of each line and then add the following lines
# Auto run the browser
@xset s off
@xset -dpms
@xset s noblank
@midori -e Fullscreen -a http://m.sytadin.fr
#(i use the mobile version of m.sytadin.fr to load the traffic road of Paris)
Use the configuration tool to enable auto running of the GUI on powerup
sudo raspi-config
Credit & mores infos: www.raspberry-projects.com
– Power supply – Install and configure start/shutdown button (option)
Power supply is provided by a 12v/5v cigarette lighter socket converter, for my test i use a Lenovo 90W Ultraslim AC/DC Combo Power Adapter.
I found a start/shutdown button on mausberrycircuits.com, also you can find many result with google, some interesting links, here and here. You need to properly shutdown the Raspberry, otherwise it will corrupt your OS.
– Case and holder
A classic enclosure Raspberry Pi B Acrylique with « GPS » holder to mount in the car, from ebay or dealextrem.
[…] wanted an easier way to monitor traffic on the roads in his area. Specifically, he wanted to monitor the roads from his car while driving. […]
[…] wanted an easier way to monitor traffic on the roads in his area. Specifically, he wanted to monitor the roads from his car while driving. […]
hello …. good project ….. can you contact at engit2020 @yahoo.com to discuss about projects …. thank you
[…] Hack a day posted about this great project! Check out the full build here. […]
This is pretty clever. I have two questions
1) You don’t mention GPS, so this doesn’t track where you are
2) Having a phone like yours, why not just run waze, or the browser on your celphone?
DG.-
Hello DG,
For my self, it s just a very simply project for beginner that would like to play with RaspberryPi, of course you can improve this project with add GPS
About Waze, I have started this project about 6 months past ago, when i used my old shitty GT-S5839i it’s a smart-phone, but with very limited memory, so forgot waze … also i prefer use my phone to send sms, call and something else, and look a screen dedicated every time i want.
Do you have any interest in selling these? This looks like it would be a perfect dedicated unit to use with Waze.
« just need to load your favorite (urban or not) traffic map » Huh?
Google maps does not show traffic status. It doesn’t update your location as you drive, either.
To constantly download maps would be fiendishly expensive, anyway.
Where are you getting data from, and how often do you update (refresh) it?
Hello Alan,
Data come from the website m.sytadin.fr (light mobile version)
The refresh is automaticaly done every minutes
In France there is no more cost if you « exceed » the quantity of data (20Gb/4G in my case)
No extra cost, just reduced speed.
Google maps does in fact show current traffic status. Go to do down menu, click on traffic and you will see live traffic conditions on the map.
[…] Více informací naleznete zde. […]
thank you