GithubHelp home page GithubHelp logo

saleemhamo / traffic-light-system Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 18.37 MB

The Traffic Light Control System aims to develop an advanced real-time responsive traffic management solution. This initiative focuses on reducing the time spent by individuals at traffic signals, thereby enhancing road safety and efficiency.

Home Page: https://saleemhamo.github.io/traffic-light-system/

License: MIT License

CMake 3.92% C++ 85.04% C 0.12% HTML 10.93%
cpp embedded raspberry-pi reatime traffic-light

traffic-light-system's Introduction

Traffic Light Control System Logo

Pioneering Traffic Management Solutions for Urban Mobility ๐Ÿšฆ

Instagram Badge Latest Release Badge Project Badge Issues Badge Pull Requests Badge

Traffic Light Control System

Welcome to the Traffic Light Control System project, an innovative solution to revolutionize urban traffic management across the UK. Our system intelligently optimizes traffic flow and enhances pedestrian safety using cutting-edge technology, all powered by a Raspberry Pi. By analyzing real-time traffic and pedestrian data, we dynamically adjust traffic signals to reduce waiting times and improve the overall safety of road intersections.

Getting Started with Installation

Step 1: Update Your Raspberry Pi

Before installing any new software, please ensure your Raspberry Pi is up-to-date with the latest system updates. This can help prevent compatibility issues and ensure the system runs smoothly.

sudo apt-get update
sudo apt-get upgrade

Step 2: Install PiGPIO

PiGPIO is essential for controlling the GPIO (General Purpose Input Output) pins on the Raspberry Pi. Install it using the following commands:

wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
make
sudo make install

Step 3: Install Necessary Libraries

Several libraries are required for the Traffic Light Control System to function properly, including Boost, OpenCV for image processing, and GStreamer for handling media.

  • Install Boost Libraries:

    sudo apt-get install libboost-all-dev
  • Install OpenCV: This library is used for processing images and videos, which is crucial for detecting vehicles and pedestrians.

    sudo apt-get install libopencv-dev libcamera-dev
  • Install GStreamer: GStreamer is used for handling video streams which is vital for any camera-based monitoring.

    sudo apt-get install gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav

Step 4: Clone and Set Up the Project

Clone the repository and prepare the software environment.

git clone https://github.com/saleemhamo/traffic-light-system.git
cd traffic-light-system
cmake .
make
sudo ./CrossGuard

Note

The information provided in these steps is subject to change as the development progresses. We welcome contributions from the community to help improve and expand the functionality of the Traffic Light Control System.

Project Components

This project is a blend of hardware (HW) and software (SW) components, working harmoniously to bring about a seamless traffic management experience soon to be deployed.

Hardware Setup

The heart of our system lies in its carefully designed circuitry and the selection of equipment:

  • Raspberry Pi: Acts as the central processing unit of our traffic control system.
  • Sensors: For real-time traffic and pedestrian demand detection.
  • Signal Lights: To visually communicate with traffic participants.

For a detailed overview of the circuit design and equipment, please refer to our Wiki page on hardware setup.

Software architecture

Our software is developed with efficiency and scalability in mind, featuring:

  • Dynamic Signal Adjustment Algorithms: To process data from various sensors and adjust traffic lights accordingly.
  • User-Friendly Interface: For easy system setup and monitoring.

The complete design document can be found in our GitHub Wiki under the Design Document section.

Note

The camera functionality in the Traffic Light Control System is made possible by the work of the community, particularly through the efforts of Bernd Porr, who provided a convenient interface for integrating libcamera with OpenCV. His repository libcamera2opencv facilitated the integration of camera functionality with Qt without much hassle.


Tip

Stay updated with the latest developments and share your feedback with us through our Instagram profile. We're excited to see how our system enhances urban traffic management for communities by dramatically improving pedestrian safety and slashing those seemingly endless waiting times at crossing!

Embrace the future of traffic control with our Traffic Light Control System, where innovation meets practicality.

traffic-light-system's People

Contributors

alexandruro45 avatar mikorosa avatar omarabdelkrim18 avatar saleemhamo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alexandruro45

traffic-light-system's Issues

Fix logic of system / delays

When the program is running on hardware, after the ultrasonic detects the motion the pedestrian led stays on red forever when system should recover to the main/default operation.
Issue discovered on 2nd April on development branch testing session

Add gpio terminate handler for each component (when ctrl+c)

When I control and c to exit from the program, the executable exits forcefully from the running state, resulting not all the gpio connected devices taking kindly this respond and resulting into errors if re-running (requiring both killing the pigpio process or fresh reboot of the system)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.