The Traffic pHAT is a simple LED board that allows users to show the status of all things! It is pre-assembled and ready to go out of the box, just connect it to your Raspberry Pi or Pi Zero and away you go.
This is just a quick guide to show you some of the steps in how to get started, from assembling your board to running your first program using our demo code.
What you need
- Raspberry Pi board with 40 way GPIO header
- Traffic pHAT
- Power Supply
- microSD card
Step 1 – First, there should be some mounting hardware with the Traffic pHAT. Take the standoffs and 4 screws and secure them to the Pi Zero board.
Step 2 – Add the Traffic pHAT on top of the Pi Zero, making sure that the GPIO header is aligned with the GPIO pins. Push the board down as far as it will go and it should sit nicely on top of the standoffs.
Step 3 – Screw the remaining screw into the standoffs on top of the Traffic pHAT.
Note: There are only 3 screws that need to be used to secure the board.
Step 4 – Download and install Raspbian OS from the Raspberry PI website https://www.raspberrypi.org/downloads/
Step 5 – Open up a terminal window and clone the GitHub repository
git clone https://github.com/PiSupply/Ryanteck.git
Enter the directory where the demo python scrip is located:
cd Ryanteck/Traffic pHAT/Software
Step 6 – Now tun the demo code, which will cycle through the Traffic LEDs
sudo python trafficPhat.py
For further information please visit https://github.com/PiSupply/Ryanteck/tree/master/Traffic%20pHAT