pi@birth ~ $ echo 0=100% > /dev/servoblaster pi@birth ~ $ echo 0=50% > /dev/servoblaster以上で動く。
デフォルトだといくつものピンがServoBlasterにマッピングされている。
servodを終了させたい場合は下記。
pi@birth ~ $ sudo servod Board revision: 2 Using hardware: PWM Using DMA channel: 14 Idle timeout: Disabled Number of servos: 8 Servo cycle time: 20000us Pulse increment step size: 10us Minimum width value: 50 (500us) Maximum width value: 250 (2500us) Output levels: Normal Using P1 pins: 7,11,12,13,15,16,18,22 Using P5 pins: Servo mapping: 0 on P1-7 GPIO-4 1 on P1-11 GPIO-17 2 on P1-12 GPIO-18 3 on P1-13 GPIO-27 4 on P1-15 GPIO-22 5 on P1-16 GPIO-23 6 on P1-18 GPIO-24 7 on P1-22 GPIO-25これだと、WiringPiでさっき使ったピンでLチカ出来ない!いや、どうしてもLチカさせたい訳じゃないけど、他のことにも使いたい。
pi@birth ~ $ sudo servod --p1pins=7 Board revision: 2 Using hardware: PWM Using DMA channel: 14 Idle timeout: Disabled Number of servos: 1 Servo cycle time: 20000us Pulse increment step size: 10us Minimum width value: 50 (500us) Maximum width value: 250 (2500us) Output levels: Normal Using P1 pins: 7 Using P5 pins: Servo mapping: 0 on P1-7 GPIO-4以上でPin7=GPIO_4だけがServoBlaster用になる。
servodを終了させたい場合は下記。
pi@birth ~ $ sudo killall servod
タグ
コメントをかく