Servo 建構子

描述

初始化 Servo 類別。

語法


Servo myservo

參數

範例

#include <Servo86.h> 

Servo myservo; // 初始化 myservo

void setup() 
{ 
  myservo.attach(9); // 設定 pin 9 為 Servo 腳位
  myservo.write(1500); // 啟動伺服機並轉到 1500us 角度
} 

void loop() {} 

See also

attach()
attached()
write()


函式庫參考主頁面

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.