Skip to content

mizu-048/Smart-Traffic-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

traffic light

Setup

ESP32-CAM

Add esp32 boards

Add https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json to:
menu bar > File > preferences
image
now go to the board manager tab and install esp32 by espressif systems
image

Install esp32-cam library

download https://github.com/yoursunny/esp32cam as zip and in arduino IDE
menu bar > sketch > Include library > Add .zip library > select downloaded zip
image


after all this, select board `AI Thinker ESP32-CAM` and upload `arduino IDE\esp32cam\esp32cam.ino` to the esp32cam
possible resoltions are 160x120, 176x144, 240x176, 320x240, 400x296, 640x480, 800x600, 1024x768, 1280x1024, 1600x1200, change according to preference in the code

Arduino

Install `AccelStepper` library and change stepper and traffic light pins according to your own wiring
Upload code

Computer

Install python from https://www.python.org/downloads/ and make sure to check `Add to PATH` during installation
Go to the upper most directory of this project and where all folders can be seen and run
`pip install -r requirements.txt` to install all the required python libraries

Running

ESP32

open serial monitor at 115200, it will ask for wifi name and password, after connecting it will print the page link where it updates the camera stream

Arduino

open serial monitor at 9600, try different command likes T, R, C1, etc to check working of all components close serial monitor

computer

change image url at line 18 in traffic_control.py according to the one given by the esp32 go to the Traffic Monitor folder and open cmd, run py traffic_control.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors