Microcontroller Sailboat

Technologies Used: STM32 Microcontroller, C, Keil, Git

An autonomous sail trim system on an STM32F103. An incremental encoder on the weather vane reads the wind direction, and a PWM servo sets the sail angle to match it. The navigation update runs off a timer interrupt rather than a busy loop, and USART carries control and telemetry.

The peripheral drivers are written from scratch against the registers rather than pulled from a HAL - GPIO, timers, PWM, USART, external interrupts and the encoder each got their own module. That was most of the work, and most of the debugging.

Source on GitHub