Skip to content

narthur/beeminder-traffic-light

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beeminder-traffic-light

Information on using a Raspberry Pi as a Beeminder traffic light

Parts List

Setup Instructions

  • Install Raspbian on mini SD card
  • Log into device using a monitor and keyboard
  • Enable SSH in the Raspbian system preferences (source)
  • Open Terminal
  • Type ifconfig and find IP address of device on your network (source)
  • On a different computer on the network, enter ssh pi@[your pi's IP] and provide password (default is raspberry) (source)
  • Install Mu (may already be installed): sudo apt-get install mu-editor

Configure Git

  • Set Git username: git config --global user.name "John Doe"
  • Set Git email: git config --global user.email [email protected]
  • Check your changes: git config --list

Source

Configure Remote Desktop

  • SSH into Pi
  • sudo raspi-config
  • Navigate to boot options, and set to "Console Autologin - Text console, automatically logged in as 'pi' user"
  • Hit right arrow key until 'Finish' is highlighted, and press enter, opting to reboot the Pi when asked
  • Reconnect via SSH once Pi has rebooted
  • Install remote desktop server on Pi via SSH: sudo apt-get install xrdp
  • Open (or install as needed) Microsoft Remote Desktop
  • Configure new connection, using Pi's IP as computer name, and pi as username

Mount Lights

Mount the traffic light component on GPIO pins 9, 10, and 11. If you're using the Pi 4 model B (pin diagram), it should look like this, with 7 pins to the left of the lights:

mounted lights

Clone & Run Project

  • SSH into Pi
  • cd to desired location
  • git clone https://github.com/narthur/beeminder-traffic-light.git
  • cd into beeminder-traffic-light directory
  • python3 -m pip install --user -r requirements.txt
  • cp config-example.yaml config.yaml
  • Edit config.yaml with your username and auth token
  • python3 main.py

Finding Your Pi's IP Address

Your Pi's IP may change periodically unless you assign a static IP to it.

  • Boot the Pi using a keyboard and monitor connected directly to it.
  • Open terminal.
  • Type ifconfig and find IP address of device on your network (source)

Terminal Commands

Pi

Run these commands on the pi, either directly or via an SSH connection.

Command Description
ifconfig Find IP address of device
sudo poweroff Turn off Pi (source)
sudo reboot Reboot Pi (source)
sudo raspi-config Configure Pi - docs

Remote

Command Description
ssh pi@[your pi's IP] SSH into Pi

About

How to use a Raspberry Pi as a Beeminder traffic light

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages