Update example config
[hdmi-switcher.git] / README.md
1 Setting Up
2 =========
3 - Install WiringPi. Easy instructions here http://wiringpi.com/download-and-install/
4 - That's it at this stage. The makefile takes care of the rest.
5
6 Running
7 ======
8 The pin numbers can be confusing. If you hold the Pi such that the GPIO header is on the *RIGHT* hand side of the board, the top left pin is refered to as pin 1, the pin directly to the right of it is pin 2. The pins continue to be named in this fashion.
9
10 Pin 7 needs to be shorted to pin 9 for the magic to happen.
11
12 Run ./hdmi-switcher as root, or using sudo.
13
14 Script Automation
15 =================
16 The scripts assume the following:
17 - An fstab entry for /dev/sda1 pointing to /mnt/usb-config
18 - Binary and scripts live in /home/pi/hdmi-switcher
19
20 The usb-config script will naively look to see if /dev/sda1 exists. If it does, it mounts it and then copies over any files on the drive with names config.ini, video.mp4
21
22 If you want to run the script on boot, you should use start.sh. start.sh runs the usb-config scripts, and then starts playing video.mp4 on a loop. It uses omxplayer (make sure whatever version you use has the --loop option). I would suggest simply adding the following to /etc/init.d/rc.local:
23
24 ```
25 /home/pi/hdmi-switcher/start.sh
26 ```