Servo86.attach()

[Servo86]

説明

Assign the Servo object to one of the output pins. When this function is called, the voltage on the specified pin will be initialized to LOW.

Syntax

servo86.attach(pin)
servo86.attach(pin, min, max)

Parameters

  • servo: Servo type of the variable.
  • pin: Pin number.
  • min (optional): The minimum PWM pulse width in microseconds (us). If there is no input value or the input value is less than 450, the default value of 450 us will be used internally as the minimum PWM width.
  • max (optional): The maximum PWM pulse width in microseconds (us). If there is no input value or the input value is greater than 2800, the default value of 2800 us will be used as the maximum PWM width.

Returns

None.

Example

#include <Servo86.h> 
 
Servo myservo;
 
void setup() 
{ 
  myservo.attach(9); // Initialize pin 9 as Servo pin
} 
 
void loop() {} 

See also


Libraries Reference Home

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

コメントする

上部へスクロール