servo geht
This commit is contained in:
parent
7b2e5aa1ef
commit
eaa8ca721a
207 changed files with 278 additions and 15300 deletions
21
control/examples/servo/main.cpp
Normal file
21
control/examples/servo/main.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include <b15f/b15f.h>
|
||||
|
||||
/*
|
||||
* Dieses Beispiel steuert einen Servo an PB3 an.
|
||||
*
|
||||
*/
|
||||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue