Reference.ServoAttach History

Hide minor edits - Show changes to markup

August 11, 2009, at 11:16 PM by David A. Mellis -
Changed lines 7-8 from:

Attach the Servo variable to a pin. Note that the Servo library supports only servos on only two pins: 9 and 10.

to:

Attach the Servo variable to a pin. Note that in Arduino 0016 and earlier, the Servo library supports only servos on only two pins: 9 and 10.

June 05, 2009, at 05:12 PM by David A. Mellis -
Changed lines 7-8 from:

Attach the Servo variable to a pin. Note that the Servo library supports only servos on only two pins: 9 and 10 on most Arduino boards, 11 and 12 on the Arduino Mega.

to:

Attach the Servo variable to a pin. Note that the Servo library supports only servos on only two pins: 9 and 10.

June 05, 2009, at 01:24 PM by David A. Mellis -
Changed lines 7-8 from:

Attach the Servo variable to a pin.

to:

Attach the Servo variable to a pin. Note that the Servo library supports only servos on only two pins: 9 and 10 on most Arduino boards, 11 and 12 on the Arduino Mega.

Changed lines 18-19 from:

pin: the number of the pin that the servo is attached to (9 or 10)

to:

pin: the number of the pin that the servo is attached to

September 07, 2008, at 09:22 AM by David A. Mellis -
Changed lines 22-23 from:

max (optional): the pulse width, in microseconds, corresponding to the maximum (180-degree) angle on the servo

to:

max (optional): the pulse width, in microseconds, corresponding to the maximum (180-degree) angle on the servo (defaults to 2400)

September 07, 2008, at 09:16 AM by David A. Mellis -
Changed lines 16-42 from:
to:

servo: a variable of type Servo

pin: the number of the pin that the servo is attached to (9 or 10)

min (optional): the pulse width, in microseconds, corresponding to the minimum (0-degree) angle on the servo (defaults to 544)

max (optional): the pulse width, in microseconds, corresponding to the maximum (180-degree) angle on the servo

Example

#include <Servo.h> 

Servo myservo;

void setup() 
{ 
  myservo.attach(9);
} 

void loop() {} 

See also

September 07, 2008, at 01:23 AM by David A. Mellis -
Added lines 1-16:

Servo

attach()

Description

Attach the Servo variable to a pin.

Syntax

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

Parameters

Share