...
This state machine governs the running state of the car and defines the conditions under which the driver can turn on and move the vehicle. Transitions for this FSM depend on the state of the directional state machine.
State | Description | Transition |
---|---|---|
Off | The vehicle is not receiving power |
|
Brake | The car is on, but braking is active |
|
Coast | The gas pedal is pressed just enough to allow the car to coast. |
|
Drive | The brakes are engaged and the car is not moving |
|
Cruise Control | The car is currently in cruise control mode |
|
Directional State Machine
This state machine governs the possible gear shifts made by the user. Transitions in the pedal state machine depend on the current state of this FSM.
State | Description | Transition |
---|---|---|
Neutral | The vehicle is in neutral gear |
|
Forward | The vehicle is in forward gear |
|
Reverse | The vehicle is in reverse |
|
Turn Signal State Machine
This state machine governs the states of the turn signals made by the driver. Independent from the other FSMs.
State | Description | Transition |
---|---|---|
No signal | The car is currently not signalling |
|
Left signal | The car has the left signal active |
|
Right signal | The car has the left signal active |
|
Hazard Light State Machine
State | Description | Transition |
---|---|---|
Hazard Light On | Hazard lights are currently active |
|
Hazard Light Off | Hazard lights are currently inactive |
|
ADC Driver
Description
The STM32 has a 12-bit onboard analog-to-digitalĀ converter (ADC). The role of an ADC is to take an analog signal as an input and give as output a digital number proportional to the magnitude of the input signal. The ADC on the STM32 has 19 multiplexed channels, allowing it to read signals from 16 external sources and 3 internal sources. The pin mappings for the 16 external sources are included below:
...