Difference between revisions of "PiTraffic"
From SB-Components Wiki
(→Pinout) |
(→Python) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
<tr><td> South Led's </td> <td> '''RED:''' GPIO 17, '''YELLOW:''' GPIO 27, '''GREEN:''' GPIO 22 </td></tr> | <tr><td> South Led's </td> <td> '''RED:''' GPIO 17, '''YELLOW:''' GPIO 27, '''GREEN:''' GPIO 22 </td></tr> | ||
<tr><td> West Led's </td> <td> '''RED:''' GPIO 23, '''YELLOW:''' GPIO 24, '''GREEN:''' GPIO 25 </td></tr> | <tr><td> West Led's </td> <td> '''RED:''' GPIO 23, '''YELLOW:''' GPIO 24, '''GREEN:''' GPIO 25 </td></tr> | ||
− | <tr><td> | + | <tr><td> North Led's </td> <td> '''RED:''' GPIO 5, '''YELLOW:''' GPIO 6, '''GREEN:''' GPIO 13 </td></tr> |
− | <tr><td> | + | <tr><td> East Led's </td> <td> '''RED:''' GPIO 16, '''YELLOW:''' GPIO 20, '''GREEN:''' GPIO 21 </td></tr> |
</table> | </table> | ||
Line 39: | Line 39: | ||
== Installation == | == Installation == | ||
==== Python ==== | ==== Python ==== | ||
+ | * Stack PiTraffic board on Raspberry Pi. | ||
+ | |||
+ | * Now attach traffic light stands on the traffic light male berg connector. | ||
+ | |||
+ | * Now clone the GitHub repository by running the below command: | ||
+ | |||
+ | <source lang="shell"> git clone https://github.com/sbcshop/PiTraffic.git </source> | ||
+ | |||
+ | * Enter downloaded repository by running the below command: | ||
+ | |||
+ | <source lang="shell"> cd PiTraffic </source> | ||
+ | |||
+ | * Now run demo file using python3 command. | ||
+ | |||
+ | <source lang="shell">python3 TrafficTest.py </source> | ||
<br> | <br> |
Latest revision as of 08:36, 5 July 2021
PiTraffic
PiTraffic is a low-cost Raspberry Pi HAT to make the users more connected with the real-world traffic light system. It operates on the 5V input with the programmable buzzer and buttons which are connected directly to the GPIO Port. It is a set of 4 traffic lights with the colorful LED(Red, Green, and Yellow).
Features
- No Soldering Required
- Low-Cost Traffic Light HAT
- Buzzer as Roundabout
- 40-pin female header included boosting height for Raspberry Pi
Specifications
- Power Supply - 5V
- Traffic light Stands - 4
- Programmable Buzzer - Yes
- Push button - 1
Pinout
Servo Driver HAT | BCM |
---|---|
VCC | 5V |
GND | GND |
Buzzer | GPIO 18 |
Button | GPIO 4 |
South Led's | RED: GPIO 17, YELLOW: GPIO 27, GREEN: GPIO 22 |
West Led's | RED: GPIO 23, YELLOW: GPIO 24, GREEN: GPIO 25 |
North Led's | RED: GPIO 5, YELLOW: GPIO 6, GREEN: GPIO 13 |
East Led's | RED: GPIO 16, YELLOW: GPIO 20, GREEN: GPIO 21 |
Installation
Python
- Stack PiTraffic board on Raspberry Pi.
- Now attach traffic light stands on the traffic light male berg connector.
- Now clone the GitHub repository by running the below command:
git clone https://github.com/sbcshop/PiTraffic.git
- Enter downloaded repository by running the below command:
cd PiTraffic
- Now run demo file using python3 command.
python3 TrafficTest.py
Resources
Github