[Servo86]
説明
Read the current angle of the servo.
構文
servo.readMicroseconds()
媒介変数
servo
: Variable of the servo type.
戻り値
The current angle of the servo (type unsigned long integer), if the servo is not yet out, the return value is 0. (Unit: us)
例
#include <Servo86.h> Servo myservo; unsigned long position; void setup() { myservo.attach(9); myservo.write(90.0); // make the servo go 90 degrees delay(100); // delay 100 ms position = myservo.readMicroseconds(); // read the current angle Serial.println(position); } void loop() {}
See also
Libraries Reference Home
86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。