Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/esimkowitz/stoplight

A stoplight demonstration using delta timing and finite state machines.
https://github.com/esimkowitz/stoplight

Last synced: 4 days ago
JSON representation

A stoplight demonstration using delta timing and finite state machines.

Awesome Lists containing this project

README

        

# stoplight
This is a fork of a project that I was working on in Computer Science 2. I adapted it to use Finite State Machines, something
which I hadn't done in the project for class. To do this, I used an enum variable with five possible states and a switch to alternate
between them. The state-switcher runs with variable delta timing where each state chooses its own deltaTime, allowing for different states
to have different timing. Like any program with delta timing, it needs to be reset every 50 days so the unsigned long doesn't rollover.
This is just a demonstrator, though so I doubt anyone will run it that long.