Prepairing a sketch
Last updated
Last updated
Finally, we are ready to write programs! Just kidding, there is another configuration step.
After a reset, any microcontroller goes through an initialization process during which the clock, peripherals, and other things are configured. In the Arduino world, these steps are usually hidden from the user. Our board is no exception, as we have created a small library that applies the basic settings.
It's called and is mandatory for proper operation. Download and place it into the Arduino's libraries folder. Usually this folder is located at C:\Program Files (x86)\Arduino\libraries or C:\Users\username\Documents\Arduino\libraries.
The following line enables this library for your sketch:
PD2 and PA5 pins are named as LED1 and LED2. PC13 named as USR_BTN.
To check that everything is set up correctly, download, build and run the following sketch.
More examples for VB32G4 and VBCore motor driver boards are in our .
BLDC motor control requires library. The complete manual is available by the link.
In case you're working with the popular AS5047 sensor we recommend using our modified .