サーボをパルスで制御しています。バグ、質問等は中田までよろしく。

Dependencies:   mbed

Fork of BusOut_HelloWorld by mbed_example

main.cpp

Committer:
WAT34
Date:
2014-12-18
Revision:
3:1b23d7a096a5
Parent:
2:e6fae83a99c1

File content as of revision 3:1b23d7a096a5:

#include "mbed.h"
PwmOut ser(p21);

int main(){
    ser.period_ms(17);
    ser.pulsewidth_ms(2.3);
    wait(1);
    while(1){
    ser.pulsewidth_ms(1.5);
    wait(1);
    ser.pulsewidth_ms(2.3);
    wait(1);
    }
}