b15f/control/examples/pwm/main.cpp
Tristan Krause 198feef12f PWM update
2019-06-07 10:47:34 +02:00

17 lines
320 B
C++

#include <iostream>
#include <cmath>
#include <b15f/b15f.h>
#include <b15f/plottyfile.h>
/*
* Erzeugt ein PWM Signal an PB4 mit 100KHz.
* Beste Frequenz: 31300
*/
int main()
{
B15F& drv = B15F::getInstance();
std::cout << "TOP: " << (int) drv.pwmSetFrequency(31300) << std::endl;
drv.pwmSetValue(127);
}