working servo using C and STM32 library

Document created by randy ransier on Jan 29, 2018Last modified by Brian Kling on Jun 5, 2018
Version 2Show Document
  • View in full screen mode

it works!  got it running tonight and wanted to share.

the code is nothing fancy

excuse all the printf's i use those for debugging, i use Putty connected at 115200 8-N-1 via my usb

i'm using usart3 for the printf to work, along with the _write() function at the bottom (won't work without it)


i have all kinds of timers enabled, but this demo is using only ONE channel of TIM4

(i have 18 motors i will be controlling on this robot so i have work to do haha)


excuse the code it's not very good. i'm somewhat of a newbie old guy, haven't been programming in C in about 25 years, and also hadn't used an o-scope

i'm using a Nucleo-F746ZG  (STM32F746ZG)


1 person found this helpful