###PiCTA
This project uses the Chicago Transit Authority API to track the next two bus arrivals outside my house. I made it because I'm always checking and rechecking this information on my phone. PiCTA only displays the predicitions I care about and updates them automatically without any interaction on my part.
Most of these components were sponsored by Newark / Element14 - thanks guys!
###BOM
Part | Cost |
---|---|
RPi 7" touchscreen | $75 |
RPi 7" touchscreen enclosure | $15 |
Raspberry Pi board (tested on B2 v1.1) | $40 |
USB wifi dongle | $12 |
Mini USB power supply | $8 |
Total | $150 |
###Basic Setup
- Assemble touchscreen/case
- Install NOOBS/Jessie (Wheezy didn't work)
sudo nano /boot/config.txt
- Add
lcd_rotate=2
at the end - reboot
sudo raspi-config
- Set time (important for CTA tracking)
- Enable SSH
- Disable overscan
- reboot
- Connect to wifi (icon at top right)
- Determine Pi IP address
- SSH to Pi
sudo apt-get update
sudo apt-get upgrade
###Server/Kiosk Setup
sudo apt-get install iceweasel
sudo apt-get install apache2 -y
sudo apt-get install php5 libapache2-mod-php5 -y
cd /var/www
sudo chown pi: html
- Replace the contents of /var/www on your RPi with the files from this repository
- Navigate RPi browser to RPi IP (do not open local file directly)
- Edit getxml.php and add your API key, route, and stop ID (see php file for links)
- Edit style.css to add a custom font
- Follow these instructions for Firefox to setup kiosk mode
sudo reboot now
###Next Steps
- Sometimes the page tries to load before the server fires up. Hasn't happened lately, so I can't pin down the problem.
- Would be fun to add more features, like maybe animated weather backgrounds and automatic startup based on day of week and time of day.