This is a simple Arduino code example implementing the velocity control program of a BLDC motor with encoder. NOTE: This program uses all the default control parameters.
This is a fork of the code and examples from "Make: AVR Programming" that I've addapted to work with the Arduino Uno R3 (I'm using the SMD variant, but it shouldn't matter which UNO R3 you're using).