https://github.com/liba001/projectmaxi
A simple traffic light intersection simulation with serial connection to Arduino.
https://github.com/liba001/projectmaxi
arduino arduino-mega education educational educational-project example-project object-oriented object-oriented-programming processing processing-sketch school-project serial serial-communication serial-port traffic-light
Last synced: 7 months ago
JSON representation
A simple traffic light intersection simulation with serial connection to Arduino.
- Host: GitHub
- URL: https://github.com/liba001/projectmaxi
- Owner: LiBa001
- License: mit
- Created: 2019-11-08T21:56:59.000Z (almost 6 years ago)
- Default Branch: arduino
- Last Pushed: 2019-11-08T22:38:55.000Z (almost 6 years ago)
- Last Synced: 2025-01-28T02:11:37.071Z (9 months ago)
- Topics: arduino, arduino-mega, education, educational, educational-project, example-project, object-oriented, object-oriented-programming, processing, processing-sketch, school-project, serial, serial-communication, serial-port, traffic-light
- Language: Processing
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TrafficLights AKA ProjectMAXI
A simple traffic light intersection simulation with serial connection to Arduino.
This is intended to be used for educational purposes.
## The Processing Part
The [Processing](./Processing) sketch implements all the traffic light and intersection logic
and automatically tries to connect to an arduino via serial port.
It also features a graphical simulation of the intersection.### Controls
> Hint: **TL** is used as an abbreviation for **traffic light**.
| Key | Function |
|:-----:| -------------------------- |
| 0 | Set all TLs off. |
| 1 | Set all TLs green. |
| 2 | Set all TLs yellow. |
| 3 | Set all TLs red. |
| 4 | Set all TLs red & yellow. |
| SPACE | Rotate states for all TLs. |
| ENTER | Simulate intersection. |## The Arduino Part
The [Arduino](./Arduino) sketch consists of the actual `Arduino.ino` file
and a Arduino/C++ library containing the `TrafficLight` class for handling the
state and controlling the LEDs.