PWM update

This commit is contained in:
Tristan Krause 2019-06-07 10:47:34 +02:00
parent 72c34b6ba4
commit 198feef12f
3 changed files with 7 additions and 8 deletions

View file

@ -3,12 +3,14 @@
#include <b15f/b15f.h>
#include <b15f/plottyfile.h>
const char PLOT_FILE[] = "plot.bin";
/*
* Erzeugt ein PWM Signal an PB4 mit 100KHz.
* Beste Frequenz: 31300
*/
int main()
{
B15F& drv = B15F::getInstance();
std::cout << "TOP: " << (int) drv.pwmSetFrequency(100000) << std::endl;
drv.pwmSetValue(40);
std::cout << "TOP: " << (int) drv.pwmSetFrequency(31300) << std::endl;
drv.pwmSetValue(127);
}