This C program is designed for the STM32 F103C8T6 and focuses on handling a wheel rotation sensor and transmitting the wheel speed over the Controller Area Network (CAN) communication protocol. The main function sets up the system clock, initializes GPIOs, and configures the CAN peripheral. An interrupt callback function HAL_GPIO_EXTI_Callback is used to calculate the wheel speed based on the time interval between two consecutive rotations of the wheel which is done by using the intervals between the positive rising edges of the sensor. The wheel speed data is then transmitted over the CAN bus using HAL_CAN_AddTxMessage in an infinite loop, with a 1-second delay between transmissions.
-
Notifications
You must be signed in to change notification settings - Fork 0
ahmed23shaf/WheelSpeedEncoder
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Real-time data transmission of wheel speeds to the dashboard using CAN communication between STM microcontrollers.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published