Hi, I'm trying to run this code with the VarSpeedServo.h:
#include <VarSpeedServo.h>
VarSpeedServo myservo; // create servo object to control a servo
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
myservo.write(180, 30, true); // move to 180 degrees, use a speed of 30, wait until move is complete
myservo.write(0, 30, true); // move to 0 degrees, use a speed of 30, wait until move is complete
}
===>but is giving the following error:
Arduino: 1.6.5 (Windows 7), Placa:"Arduino/Genuino Uno"
sketch_sep19g.ino: In function 'void loop()':
sketch_sep19g:10: error: no matching function for call to 'VarSpeedServo::write(int, int, bool)'
sketch_sep19g.ino:10:30: note: candidate is:
In file included from sketch_sep19g.ino:1:0:
C:\Users\usuario\Documents\Arduino\libraries\VarSpeedServo/VarSpeedServo.h:130:8: note: void VarSpeedServo::write(int)
void write(int value); // if value is < 200 its treated as an angle, otherwise as pulse width in microseconds
^
C:\Users\usuario\Documents\Arduino\libraries\VarSpeedServo/VarSpeedServo.h:130:8: note: candidate expects 1 argument, 3 provided
sketch_sep19g:11: error: no matching function for call to 'VarSpeedServo::write(int, int, bool)'
sketch_sep19g.ino:11:28: note: candidate is:
In file included from sketch_sep19g.ino:1:0:
C:\Users\usuario\Documents\Arduino\libraries\VarSpeedServo/VarSpeedServo.h:130:8: note: void VarSpeedServo::write(int)
void write(int value); // if value is < 200 its treated as an angle, otherwise as pulse width in microseconds
^
C:\Users\usuario\Documents\Arduino\libraries\VarSpeedServo/VarSpeedServo.h:130:8: note: candidate expects 1 argument, 3 provided
Multiple libraries were found for "VarSpeedServo.h"
Used: C:\Users\usuario\Documents\Arduino\libraries\VarSpeedServo
Not used: C:\Program Files (x86)\Arduino\libraries\VarSpeedServo
no matching function for call to 'VarSpeedServo::write(int, int, bool)'
====>someone could help me, please!