- #1
owtu
- 15
- 1
An example:
A car that senses if you have your seat belt on and the door is closed
I can declare:
D - for door
S - for seat belt
D is 1 is door is open, 0 if door is closed
S is 1 if seat belt is on, 0 if it's off
This is all very straight forward and can be implemented with combinational logic, but I'm working on something that uses sequential logic. I'll probably use a 555 timer and a 4017
If I have an intersection, the main street with a turn signal light and the main light and a side street that is rarely busy, it will only turn green when a car is present on that street.
Right off the bat I know I need a variable for the sensor that detects a car that is present on the side street
S - Sensor
S is 1 if car is present and 0 if no car is present
But I'm confused about how many variables I need for my street lights. I have a total of 9 LEDs: 3 reds, 3 yellows, and 3 greens. My plan is to have the reds and greens on for 20 seconds and the yellows for 4 seconds.
A car that senses if you have your seat belt on and the door is closed
I can declare:
D - for door
S - for seat belt
D is 1 is door is open, 0 if door is closed
S is 1 if seat belt is on, 0 if it's off
This is all very straight forward and can be implemented with combinational logic, but I'm working on something that uses sequential logic. I'll probably use a 555 timer and a 4017
If I have an intersection, the main street with a turn signal light and the main light and a side street that is rarely busy, it will only turn green when a car is present on that street.
Right off the bat I know I need a variable for the sensor that detects a car that is present on the side street
S - Sensor
S is 1 if car is present and 0 if no car is present
But I'm confused about how many variables I need for my street lights. I have a total of 9 LEDs: 3 reds, 3 yellows, and 3 greens. My plan is to have the reds and greens on for 20 seconds and the yellows for 4 seconds.