Hi All
I have been working on a project for a servo and relay controller which I have got fully working using an Arduino Micro and all the little bugs have been ironed out . I'm now at the stage of wanting to get a few PCB's produced for this project which I plan on using ATmega32A IC's for. I have installed the MightyCore pack and have managed to use one of my UNO's to burn the Bootloader to the ATmega32A and then upload and run the blink sketch without any problems.
I have now changed the pin numbers in my sketch to match the ATmega32A and have included the MightyCore Servo library which automatically adds the MightyCore ServoTimers library but get the following error messages when compiling:
In file included from /Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/Servo.h:52:0,
from /Users/martinstewart/Documents/Arduino/ATmega32A_quad_servo_driver/ATmega32A_quad_servo_driver.ino:25:
/Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/ServoTimers.h:65:16: error: redeclaration of '_timer1'
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
^~~~~~~
In file included from /Users/martinstewart/Documents/Arduino/ATmega32A_quad_servo_driver/ATmega32A_quad_servo_driver.ino:24:0:
/Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/ServoTimers.h:65:16: note: previous declaration 'timer16_Sequence_t _timer1'
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
^~~~~~~
In file included from /Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/Servo.h:52:0,
from /Users/martinstewart/Documents/Arduino/ATmega32A_quad_servo_driver/ATmega32A_quad_servo_driver.ino:25:
/Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/ServoTimers.h:65:25: error: redeclaration of '_Nbr_16timers'
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
^~~~~~~~~~~~~
In file included from /Users/martinstewart/Documents/Arduino/ATmega32A_quad_servo_driver/ATmega32A_quad_servo_driver.ino:24:0:
/Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/ServoTimers.h:65:25: note: previous declaration 'timer16_Sequence_t _Nbr_16timers'
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
^~~~~~~~~~~~~
In file included from /Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/Servo.h:52:0,
from /Users/martinstewart/Documents/Arduino/ATmega32A_quad_servo_driver/ATmega32A_quad_servo_driver.ino:25:
/Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/ServoTimers.h:65:41: error: conflicting declaration 'typedef enum timer16_Sequence_t timer16_Sequence_t'
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
^~~~~~~~~~~~~~~~~~
In file included from /Users/martinstewart/Documents/Arduino/ATmega32A_quad_servo_driver/ATmega32A_quad_servo_driver.ino:24:0:
/Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo/src/ServoTimers.h:65:41: note: previous declaration as 'typedef enum timer16_Sequence_t timer16_Sequence_t'
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
^~~~~~~~~~~~~~~~~~
exit status 1
Error compiling for board ATmega32.
If I remove the ServoTimers library I get the following error messages:
/Users/martinstewart/Documents/Arduino/libraries/Servo/src/avr/Servo.cpp: In function 'void initISR(timer16_Sequence_t)':
/Users/martinstewart/Documents/Arduino/libraries/Servo/src/avr/Servo.cpp:136:5: error: 'TIFR1' was not declared in this scope
TIFR1 |= _BV(OCF1A); // clear any pending interrupts;
^~~~~
/Users/martinstewart/Documents/Arduino/libraries/Servo/src/avr/Servo.cpp:136:5: note: suggested alternative: 'TIFR'
TIFR1 |= _BV(OCF1A); // clear any pending interrupts;
^~~~~
TIFR
/Users/martinstewart/Documents/Arduino/libraries/Servo/src/avr/Servo.cpp:137:5: error: 'TIMSK1' was not declared in this scope
TIMSK1 |= _BV(OCIE1A) ; // enable the output compare interrupt
^~~~~~
/Users/martinstewart/Documents/Arduino/libraries/Servo/src/avr/Servo.cpp:137:5: note: suggested alternative: 'TIMSK'
TIMSK1 |= _BV(OCIE1A) ; // enable the output compare interrupt
^~~~~~
TIMSK
Multiple libraries were found for "Servo.h"
Used: /Users/martinstewart/Documents/Arduino/libraries/Servo
Not used: /private/var/folders/gj/jw9sq7c95qs_5r_kszfs0g9m0000gn/T/AppTranslocation/A6D84A38-6BF8-4890-8C2F-E7DB504B91B4/d/Arduino.app/Contents/Java/libraries/Servo
Not used: /Users/martinstewart/Library/Arduino15/packages/MightyCore/hardware/avr/2.1.1/libraries/Servo
exit status 1
Error compiling for board ATmega32.
I've tried various other things like using the original Servo library which ran well on the Arduino Micro but I still get error messages and can't compile.
I'm fairly new to working with Arduino and coding so is there anything obvious I'm missing here or something I haven't tried?
I can show my original sketch if that helps but it's quite lengthy.
Many Thanks
Martin