Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.09 KB

README.md

File metadata and controls

52 lines (42 loc) · 1.09 KB

Railway Crossing

Railway crossing: 2 red LEDs and Sound

Note: I am just beginning with Raspberry Pi and Python, this project is not meant to be perfect.

Material

Preparing the Raspberry

Install audio player

pip3 install python-vlc

sudo apt-get install vlc

add two lines to /boot/config.txt:

dtoverlay=hifiberry-dac
gpio=25=op,dh

commend this line out in /boot/config.txt:

# dtparam=audio=on

(See https://shop.pimoroni.com/products/audio-amp-shim-3w-mono-amp for details)

GPIOzero:

sudo apt install python3-gpiozero

Pi Connectors

  • PIN 6: GND
  • Pin 11 / GPIO 17: LED 1
  • Pin 13 / GPIO 27: LED 2
  • GPIO 18, 19, 21: Used by Audio Amp Shim
  • PINs 1 + 21: Switch

Setup

  • Checkout files to /home/pi/projects/bahnuebergang
  • install service:
sudo sh /home/pi/projects/bahnuebergang/install_service.sh