[NANO] The standard Arduino Servo Class
More...
#include <eagle_Servo.h>
|
uint8_t | servoIndex |
| the channel index this servo is using More...
|
|
int8_t | min |
| minimum is this value times 4 added to MIN_PULSE_WIDTH More...
|
|
int8_t | max |
| maximum is this value times 4 added to MAX_PULSE_WIDTH More...
|
|
[NANO] The standard Arduino Servo Class
- Author
- Michael Margolis
- Copyright
- Copyright (c) 2013 Arduino LLC. All right reserved. Copyright (c) 2009 Michael Margolis. All right reserved.
With EBOARD_NANO this will provide two Servo-instances for you: mainMotor & steerMotor
Definition at line 84 of file eagle_Servo.h.
◆ Servo()
◆ attach() [1/2]
uint8_t Servo::attach |
( |
int |
pin | ) |
|
this will tell the Servo-instance which pin the data cable is connected to
- Parameters
-
- Returns
- the channel that will be used - 0 on failure
◆ attach() [2/2]
uint8_t Servo::attach |
( |
int |
pin, |
|
|
int |
min, |
|
|
int |
max |
|
) |
| |
this will tell the Servo-instance which pin the data cable is connected to and sets min and maximum values
- Parameters
-
pin | the PinID to use |
min | the minimum value |
max | the maximum value |
- Returns
- the channel that will be used - 0 on failure
◆ attached()
check attached status
- Returns
- attached status
◆ detach()
detaches the connected pin
◆ read()
reads the current pulse width as angle
- Returns
- returns current angle (software side)
◆ readMicroseconds()
int Servo::readMicroseconds |
( |
| ) |
|
reads the current pulse width
- Returns
- returns current pulse width in µs (software side)
◆ write()
void Servo::write |
( |
int |
value | ) |
|
sets angle or pulse width of the Servo
- Parameters
-
value | the value if <200 it's treated as an angle else it is treated as pulse width in µs |
◆ writeMicroseconds()
void Servo::writeMicroseconds |
( |
int |
value | ) |
|
sets pulse width of the Servo
- Parameters
-
value | the pulse width in µs |
◆ max
maximum is this value times 4 added to MAX_PULSE_WIDTH
Definition at line 135 of file eagle_Servo.h.
◆ min
minimum is this value times 4 added to MIN_PULSE_WIDTH
Definition at line 133 of file eagle_Servo.h.
◆ servoIndex
uint8_t Servo::servoIndex |
|
private |
the channel index this servo is using
Definition at line 131 of file eagle_Servo.h.
The documentation for this struct was generated from the following file: