Closed BNSF-FAN closed 1 year ago
Can you post your sketch here? It looks like the Servo library is conflicting with another library.
ServoTimers.h
does not have include guards and it is getting included twice, first directly (and unnecessarily) from sketch line 2 and the from Servo.h
which is included from sketch line 4.
In file included from libraries\Servo\src/Servo.h:52:0,
from RIGHT_HAND_TURNOUT_CONTROL_POINT_Firmware.ino:4:
libraries\Servo\src/ServoTimers.h:65:16: error: redeclaration of '_timer1'
In file included RIGHT_HAND_TURNOUT_CONTROL_POINT_Firmware.ino:2:0:
libraries\Servo\src/ServoTimers.h:65:16: note: previous declaration 'timer16_Sequence_t _timer1'
----
In file included from libraries\Servo\src/Servo.h:52:0,
from RIGHT_HAND_TURNOUT_CONTROL_POINT_Firmware.ino:4:
libraries\Servo\src/ServoTimers.h:65:25: error: redeclaration of '_Nbr_16timers'
In file included from RIGHT_HAND_TURNOUT_CONTROL_POINT_Firmware.ino:2:0:
libraries\Servo\src/ServoTimers.h:65:25: note: previous declaration 'timer16_Sequence_t _Nbr_16timers'
----
In file included from libraries\Servo\src/Servo.h:52:0,
from RIGHT_HAND_TURNOUT_CONTROL_POINT_Firmware.ino:4:
libraries\Servo\src/ServoTimers.h:65:41: error: conflicting declaration 'typedef enum timer16_Sequence_t timer16_Sequence_t'
In file included from RIGHT_HAND_TURNOUT_CONTROL_POINT_Firmware.ino:2:0:
libraries\Servo\src/ServoTimers.h:65:41: note: previous declaration as 'typedef enum timer16_Sequence_t timer16_Sequence_t'
@BNSF-FAN
Remove #include <ServoTimers.h>
.
@MCUdude
Add include guards to ServoTimers.h
.
I cannot compile a sketch, I will post all errors(?), maybe I'm doing something wrong. No forums will help me saying they don't know about fixing the issue. I don't know where to go. I am not having any luck. Can you help me out?
Here is what the IDE gave me;
Please, can you help me? I am really confused...
Many, many thanks!!
Kim