Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erictherobot/julia-traffic-lights
A simple traffic light simulator written in the Julia programming language.
https://github.com/erictherobot/julia-traffic-lights
julia julia-language julia-testing simulation traffic-light
Last synced: about 2 months ago
JSON representation
A simple traffic light simulator written in the Julia programming language.
- Host: GitHub
- URL: https://github.com/erictherobot/julia-traffic-lights
- Owner: erictherobot
- License: mit
- Created: 2023-07-22T22:56:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-22T22:59:45.000Z (over 1 year ago)
- Last Synced: 2024-10-12T14:41:49.289Z (3 months ago)
- Topics: julia, julia-language, julia-testing, simulation, traffic-light
- Language: Julia
- Homepage: https://ericdavidsmith.com/blog/software/building-a-traffic-light-system-in-julia-programming-language
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Julia Traffic Lights
A simple traffic light simulator written in the Julia programming language. The program will output the current light color and how long it will stay that color. The program will continue to cycle through the lights until the program is stopped.
## Why?
I've been learning [Julia](https://julialang.org/) and this seemed like a fun project to create.
## Requirements
- Julia v1.9.2 - (July 5, 2023)
## Instal Julia
```bash
brew install --cask julia
```or
Download and install from [julialang.org](https://julialang.org/downloads/)
## Usage
```bash
julia src/main.jl
```## Example Output
Below is a sample output of the program.
```bash
➜ julia_playground julia src/main.jl
Cycle 1: Light is Red for 55 seconds
Cycle 2: Light is Green for 60 seconds
Cycle 3: Light is Yellow for 5 seconds
Cycle 4: Light is Red for 55 seconds
```## Testing
```bash
julia test/runtests.jl
```## License
[MIT](LICENSE)
## Author
Eric David Smith [@erictherobot](https://ericdavidsmith.com)