Northeastern-Electric-Racing / Cerberus

Our FreeRTOS-based vehicle control application
1 stars 0 forks source link

Improve ADC of Pedal Inputs #79

Closed nwdepatie closed 9 months ago

nwdepatie commented 11 months ago

So we want to take an ADC reading of the accelerator and the brake sensors and then utilize those values in the program.

We need to figure out the bets configuration of ADCs in STM32CubeMX, actually copy the value into 4 distinct values in C, and potentially investigate DMA

nwdepatie commented 10 months ago

DMA seems to be a complete nightmare with Renode, so I might just use simple conversions

nwdepatie commented 10 months ago

Specifically, here is the new config I am using, since we want the highest resolution on the actual accelerator pedals, I am allocating individual ADCs to both, and then the brake inputs share an ADC. This should result in values of 0-4096 for the accelerators with them being faster. image