Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Displays MTD departure information for stop at 1101 E. University Avenue in Urbana, IL

License

Notifications You must be signed in to change notification settings

CUMTD/1101DeparturesDisplay

Repository files navigation

1101 Departures Display

Displays MTD departure information for stop at 1101 E. University Avenue in Urbana, IL

Tested against Google Chrome (v43.0.2357.124) and designed to be run on Chromium Browser on a Raspberry PI 2.

Running Locally

  1. Follow the steps at

Requirements

  • Node/NPM
  • Ruby

Setup NPM, Typings and Webpack

Once node and npm are configured run the following node commands from the project root.

yarn install

To build the scripts run either webpack or webpack -w. The latter will watch main.tsx for changes.

Setup Github Pages

https://help.github.com/articles/using-jekyll-with-pages/#installing-jekyll to install Ruby, Bundler, and Jekyll. 2. To run the development server, from the application's root directory run: bundle exec jekyll serve

Setting up a Raspberry Pi to Run as a Kiosk

Much of the following comes from: https://github.com/MobilityLab/TransitScreen/wiki/Raspberry-pi

Installing Raspbian

Install Raspbian from using an SD card with the NOOBS launcher.

Configuring Raspbian

Once everything is installed and you are logged in, we need to configure the OS to run our software in kiosk mode.

  1. Install chromium source:

    wget -qO - http://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
    echo "deb http://dl.bintray.com/kusti8/chromium-rpi jessie main" | sudo tee -a /etc/apt/sources.list
    sudo apt-get update
  2. Do a sudo apt-get upgrade to update to all the latest software.

  3. Install Required Software

  4. Chromium Browser: sudo apt-get install chromium-browser.

  5. X11: sudo apt-get install x11-xserver-utils xorg

  6. Unclutter (Hides Mouse Pointer): sudo apt-get install unclutter

  7. (optional) VIM: sudo apt-get install vim

  8. Add the following kiosk script to your home folder

  9. vi kiosk.sh

  10. Edit the script as follows:

#!/bin/sh
/usr/bin/xset -dpms
/usr/bin/xset s off
/usr/bin/unclutter & /usr/bin/chromium-browser -window-size=1280,1024 -kiosk -incognito http://cumtd.github.io/1101DeparturesDisplay/
  1. Allow the script to be executed. chmod 755

  2. Setup autologin

  3. sudo vi /etc/systemd/system/getty@tty1.service.d/autologin.conf and add the following:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux
  1. Start the kiosk on login.
    1. Add a startup script: sudo vi /etc/profile.d/start_kiosk.sh
    2. Edit the script as follows:
    #!/bin/sh
    /usr/bin/xinit /home/pi/kiosk.sh
    1. Allow the script to be executed. sudo chmod 755 /etc/profile.d/start_kiosk.sh
  2. Force Raspbian to use the correct resolution.
  3. Edit the Raspbin config file. sudo vi /boot/config.txt
  4. Find the lines that start with
#framebuffer_width=XXXX
#framebuffer_height=XXXX

and replace them with

framebuffer_width=1280
framebuffer_height=1024
  1. Reboot and make sure everythin works as expected sudo shutdown -r now