#include <Adafruit_PWMServoDriver.h>
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup() {
myservo.attach(D0); //Connect servo to Grove Digital Port
}
void loop() {
for (pos = 0; pos <= 179; pos += 1) {
// in steps of 1 degree
myservo.write(pos);
delay(15);
}
for (pos = 179; pos >= 0; pos -= 1) {
myservo.write(pos);
delay(15);
}
}
The error message is below:
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp: In function ‘void Servo_Handler(timer16_Sequence_t, Tc*, uint8_t, uint8_t)’:
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:64:9: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:81:9: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:84:9: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:91:9: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:99:9: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp: In function ‘void resetTC(Tc*)’:
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:112:5: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(TCx)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:116:5: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(TCx)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp: In function ‘void _initISR(Tc*, uint8_t, uint32_t, IRQn_Type, uint8_t, uint8_t)’:
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:11: error: ‘struct Gclk’ has no member named ‘CLKCTRL’; did you mean ‘GENCTRL’?
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~
GENCTRL
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:37: error: ‘GCLK_CLKCTRL_CLKEN’ was not declared in this scope
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:37: note: suggested alternative: ‘GCLK_CLKCTRL_IDs’
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~~~~~~~~~~~~
GCLK_CLKCTRL_IDs
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:58: error: ‘GCLK_CLKCTRL_GEN_GCLK0’ was not declared in this scope
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:58: note: suggested alternative: ‘GCLK_PCHCTRL_GEN_GCLK0’
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~~~~~~~~~~~~~~~~
GCLK_PCHCTRL_GEN_GCLK0
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:83: error: ‘GCLK_CLKCTRL_ID’ was not declared in this scope
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:123:83: note: suggested alternative: ‘GCLK_CLKCTRL_IDs’
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(gcmForTimer));
^~~~~~~~~~~~~~~
GCLK_CLKCTRL_IDs
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:124:18: error: ‘struct Gclk’ has no member named ‘STATUS’
while (GCLK->STATUS.bit.SYNCBUSY);
^~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:134:30: error: ‘TC_CTRLA_WAVEGEN_NPWM’ was not declared in this scope
tc->COUNT16.CTRLA.reg |= TC_CTRLA_WAVEGEN_NPWM;
^~~~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:134:30: note: suggested alternative: ‘TC_WAVE_WAVEGEN_NPWM’
tc->COUNT16.CTRLA.reg |= TC_CTRLA_WAVEGEN_NPWM;
^~~~~~~~~~~~~~~~~~~~~
TC_WAVE_WAVEGEN_NPWM
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:141:5: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:145:5: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:44:60: error: ‘volatile struct TC_STATUS_Type::’ has no member named ‘SYNCBUSY’
#define WAIT_TC16_REGS_SYNC(x) while(x->COUNT16.STATUS.bit.SYNCBUSY);
^
/Users/anmolbaruwal/Documents/Arduino/libraries/Servo/src/samd/Servo.cpp:159:5: note: in expansion of macro ‘WAIT_TC16_REGS_SYNC’
WAIT_TC16_REGS_SYNC(tc)
^~~~~~~~~~~~~~~~~~~
Multiple libraries were found for “Servo.h”
Used: /Users/anmolbaruwal/Documents/Arduino/libraries/Servo
Not used: /Users/anmolbaruwal/Documents/Arduino/libraries/Servo-master
Not used: /private/var/folders/2g/f0w4vjh51dq27j_m2k5p3pp80000gn/T/AppTranslocation/CD2CDC8A-4EAB-4DA0-B2D3-3FF5EA2FCF60/d/Arduino 2.app/Contents/Java/libraries/Servo
exit status 1
Error compiling for board Seeeduino Wio Terminal.