I think think is something simple and obvious but when I try to compile the downloaded script for this Uno Wifi Rev2, I get a bunch of errors as follows :
char* Version = "1.0.0.166";
^~~~~~~~~~~
In file included from C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:27:0:
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp: In function 'void TIMER2_COMPA_vect()':
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:34:36: warning: 'TIMER2_COMPA_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
#define SOFTPWM_TIMER_INTERRUPT TIMER2_COMPA_vect
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:70:5: note: in expansion of macro 'SOFTPWM_TIMER_INTERRUPT'
ISR(SOFTPWM_TIMER_INTERRUPT)
^~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:29:0:
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp: In function 'void SoftPWMBegin(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:3: error: 'TIFR2' was not declared in this scope
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:3: note: suggested alternative: 'TIMERB2'
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:17: error: 'TOV2' was not declared in this scope
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:17: note: suggested alternative: 'TCB2'
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:38:3: error: 'TCCR2B' was not declared in this scope
TCCR2B = (1 << CS21); /* start timer (ck/8 prescalar) */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:38:3: note: suggested alternative: 'TCB2'
TCCR2B = (1 << CS21); /* start timer (ck/8 prescalar) */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:38:18: error: 'CS21' was not declared in this scope
TCCR2B = (1 << CS21); /* start timer (ck/8 prescalar) */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:39:3: error: 'TCCR2A' was not declared in this scope
TCCR2A = (1 << WGM21); /* CTC mode */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:39:3: note: suggested alternative: 'TCB2'
TCCR2A = (1 << WGM21); /* CTC mode */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:39:18: error: 'WGM21' was not declared in this scope
TCCR2A = (1 << WGM21); /* CTC mode */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:40:3: error: 'OCR2A' was not declared in this scope
OCR2A = (ocr); /* We want to have at least 30Hz or else it gets choppy */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:41:3: error: 'TIMSK2' was not declared in this scope
TIMSK2 = (1 << OCIE2A); /* enable timer2 output compare match interrupt */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:41:3: note: suggested alternative: 'TIMERB2'
TIMSK2 = (1 << OCIE2A); /* enable timer2 output compare match interrupt */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:41:18: error: 'OCIE2A' was not declared in this scope
TIMSK2 = (1 << OCIE2A); /* enable timer2 output compare match interrupt */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp: In function 'void SoftPWMSet(int8_t, uint8_t, uint8_t)':
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:35:37: error: 'TCNT2' was not declared in this scope
#define SOFTPWM_TIMER_SET(val) (TCNT2 = (val))
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:205:5: note: in expansion of macro 'SOFTPWM_TIMER_SET'
SOFTPWM_TIMER_SET(0);
^~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:35:37: note: suggested alternative: 'TCB2'
#define SOFTPWM_TIMER_SET(val) (TCNT2 = (val))
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:205:5: note: in expansion of macro 'SOFTPWM_TIMER_SET'
SOFTPWM_TIMER_SET(0);
^~~~~~~~~~~~~~~~~
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.
Clearly its having issues with the SoftPWM library. I downloaded the library files again and copied them into the folder as I had before, but no change.
This is a new Uno Wifi Rev2 board. I have compiled and loaded a few other scripts to it and it was fine.
As I said, I suspect its something stupid/simple......
char* Version = "1.0.0.166";
^~~~~~~~~~~
In file included from C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:27:0:
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp: In function 'void TIMER2_COMPA_vect()':
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:34:36: warning: 'TIMER2_COMPA_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
#define SOFTPWM_TIMER_INTERRUPT TIMER2_COMPA_vect
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:70:5: note: in expansion of macro 'SOFTPWM_TIMER_INTERRUPT'
ISR(SOFTPWM_TIMER_INTERRUPT)
^~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:29:0:
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp: In function 'void SoftPWMBegin(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:3: error: 'TIFR2' was not declared in this scope
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:3: note: suggested alternative: 'TIMERB2'
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:17: error: 'TOV2' was not declared in this scope
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:37:17: note: suggested alternative: 'TCB2'
TIFR2 = (1 << TOV2); /* clear interrupt flag */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:38:3: error: 'TCCR2B' was not declared in this scope
TCCR2B = (1 << CS21); /* start timer (ck/8 prescalar) */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:38:3: note: suggested alternative: 'TCB2'
TCCR2B = (1 << CS21); /* start timer (ck/8 prescalar) */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:38:18: error: 'CS21' was not declared in this scope
TCCR2B = (1 << CS21); /* start timer (ck/8 prescalar) */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:39:3: error: 'TCCR2A' was not declared in this scope
TCCR2A = (1 << WGM21); /* CTC mode */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:39:3: note: suggested alternative: 'TCB2'
TCCR2A = (1 << WGM21); /* CTC mode */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:39:18: error: 'WGM21' was not declared in this scope
TCCR2A = (1 << WGM21); /* CTC mode */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:40:3: error: 'OCR2A' was not declared in this scope
OCR2A = (ocr); /* We want to have at least 30Hz or else it gets choppy */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:41:3: error: 'TIMSK2' was not declared in this scope
TIMSK2 = (1 << OCIE2A); /* enable timer2 output compare match interrupt */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:41:3: note: suggested alternative: 'TIMERB2'
TIMSK2 = (1 << OCIE2A); /* enable timer2 output compare match interrupt */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:41:18: error: 'OCIE2A' was not declared in this scope
TIMSK2 = (1 << OCIE2A); /* enable timer2 output compare match interrupt */ \
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:156:3: note: in expansion of macro 'SOFTPWM_TIMER_INIT'
SOFTPWM_TIMER_INIT(SOFTPWM_OCR);
^~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp: In function 'void SoftPWMSet(int8_t, uint8_t, uint8_t)':
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:35:37: error: 'TCNT2' was not declared in this scope
#define SOFTPWM_TIMER_SET(val) (TCNT2 = (val))
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:205:5: note: in expansion of macro 'SOFTPWM_TIMER_SET'
SOFTPWM_TIMER_SET(0);
^~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM_timer.h:35:37: note: suggested alternative: 'TCB2'
#define SOFTPWM_TIMER_SET(val) (TCNT2 = (val))
^
C:\Program Files (x86)\Arduino\libraries\SoftPWM\SoftPWM.cpp:205:5: note: in expansion of macro 'SOFTPWM_TIMER_SET'
SOFTPWM_TIMER_SET(0);
^~~~~~~~~~~~~~~~~
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.
Clearly its having issues with the SoftPWM library. I downloaded the library files again and copied them into the folder as I had before, but no change.
This is a new Uno Wifi Rev2 board. I have compiled and loaded a few other scripts to it and it was fine.
As I said, I suspect its something stupid/simple......
Comment