Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Governs the possible gear shifts made by the user.

StateDescription
NeutralThe vehicle is in neutral gear
ForwardThe vehicle is in forward gear
ReverseThe vehicle is in reverse

Turn Signal State Machine

Governs the states of the turn signals made by the driver. Independent from the other FSMs.

StateDescription
No signalThe car is currently not signalling
Left signalThe car has the left signal active
Right signalThe car has the left signal active


ADC Driver

On the STM32 is a 12-bit 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 following formula can be used to determine the ADC reading:

...

In addition, the ADC has two different modes for converting analog signals:

  • Single Conversion Mode: The ADC performs the conversion for a channel and stops after the conversion for that channel has been completed
  • Continuous Conversion Mode: The ADC will convert a channel indefinitely at regular intervalsĀ