b15f/control/examples/servo/main.cpp

22 lines
338 B
C++
Raw Normal View History

2019-06-27 13:29:18 +00:00
#include <b15f/b15f.h>
/*
2019-06-27 14:19:27 +00:00
* Dieses Beispiel steuert einen Servo an PB2 an.
2019-06-27 13:29:18 +00:00
*
*/
int main()
{
B15F& drv = B15F::getInstance();
// aktiviere Servo Signal
drv.setServoEnabled();
// drehe Servo
drv.setServoPosition(1000);
drv.delay_ms(2000);
// drehe Servo
drv.setServoPosition(19000);
}