Servo86.writeMicroseconds()

[Servo86]

説明

Set the target angle of the servo, and let the servo rotate to the target angle.

Please note that the servo will be activated immediately after calling this function. Please avoid turning the servo vigorously by hand to avoid injury or damage to the servo.

Syntax

servo.writeMicroseconds(position)

Parameters

  • servo: the variable of servo type.
  • position: target angle, unit: us.

Returns

None.

Example

#include <Servo86.h> 
 
Servo myservo;
 
void setup() 
{ 
  myservo.attach(9);
  myservo.writeMicroseconds(1500);  // Let the servo turn to the 1500us angle
} 
 
void loop() {} 

See also


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール