ARDUINO Проблема с GyverHacks и GyverRGB на Ardoino ProMicro

SashaPetrov

✩✩✩✩✩✩✩
22 Май 2019
28
2
Пытаюсь получить шим на 2пине с помощью библиотек.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Для GyverHacks выдаёт:
C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp: In function 'void setPWMmode(byte, byte)':

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:167:13: error: 'TCCR2A' was not declared in this scope

if (mode) TCCR2A |= _BV(WGM20);

^~~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:167:13: note: suggested alternative: 'TCCR0A'

if (mode) TCCR2A |= _BV(WGM20);

^~~~~~

TCCR0A

In file included from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,

from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,

from C:\Users\�����\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.2\cores\arduino/Arduino.h:28,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.h:3,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:1:

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:167:27: error: 'WGM20' was not declared in this scope

if (mode) TCCR2A |= _BV(WGM20);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:167:27: note: suggested alternative: 'WGM40'

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:168:8: error: 'TCCR2A' was not declared in this scope

else TCCR2A |= _BV(WGM20) | _BV(WGM21);

^~~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:168:8: note: suggested alternative: 'TCCR0A'

else TCCR2A |= _BV(WGM20) | _BV(WGM21);

^~~~~~

TCCR0A

In file included from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,

from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,

from C:\Users\�����\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.2\cores\arduino/Arduino.h:28,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.h:3,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:1:

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:168:22: error: 'WGM20' was not declared in this scope

else TCCR2A |= _BV(WGM20) | _BV(WGM21);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:168:22: note: suggested alternative: 'WGM40'

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:168:35: error: 'WGM21' was not declared in this scope

else TCCR2A |= _BV(WGM20) | _BV(WGM21);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:168:35: note: suggested alternative: 'WGM41'

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp: In function 'void setPWMprescaler(uint8_t, uint16_t)':

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:224:2: error: 'TCCR2B' was not declared in this scope

TCCR2B = 0;

^~~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:224:2: note: suggested alternative: 'TCCR0B'

TCCR2B = 0;

^~~~~~

TCCR0B

In file included from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,

from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,

from C:\Users\�����\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.2\cores\arduino/Arduino.h:28,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.h:3,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:1:

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp: In function 'void setPWM(uint8_t, uint16_t)':

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:7: error: 'TCCR2A' was not declared in this scope

sbi(TCCR2A, COM2B1);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:3: note: in expansion of macro 'sbi'

sbi(TCCR2A, COM2B1);

^~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:7: note: suggested alternative: 'TCCR0A'

sbi(TCCR2A, COM2B1);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:3: note: in expansion of macro 'sbi'

sbi(TCCR2A, COM2B1);

^~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:15: error: 'COM2B1' was not declared in this scope

sbi(TCCR2A, COM2B1);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:3: note: in expansion of macro 'sbi'

sbi(TCCR2A, COM2B1);

^~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:15: note: suggested alternative: 'COM1B1'

sbi(TCCR2A, COM2B1);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:294:3: note: in expansion of macro 'sbi'

sbi(TCCR2A, COM2B1);

^~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:295:3: error: 'OCR2B' was not declared in this scope

OCR2B = duty;

^~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:295:3: note: suggested alternative: 'OCR4B'

OCR2B = duty;

^~~~~

OCR4B

In file included from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,

from c:\users\�����\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,

from C:\Users\�����\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.2\cores\arduino/Arduino.h:28,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.h:3,

from C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:1:

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:298:15: error: 'COM2A1' was not declared in this scope

sbi(TCCR2A, COM2A1);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:298:3: note: in expansion of macro 'sbi'

sbi(TCCR2A, COM2A1);

^~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:298:15: note: suggested alternative: 'COM0A1'

sbi(TCCR2A, COM2A1);

^

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:298:3: note: in expansion of macro 'sbi'

sbi(TCCR2A, COM2A1);

^~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:299:3: error: 'OCR2A' was not declared in this scope

OCR2A = duty;

^~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:299:3: note: suggested alternative: 'OCR3A'

OCR2A = duty;

^~~~~

OCR3A

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp: In function 'void anyPWMinit(byte)':

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:314:3: error: 'TCCR2A' was not declared in this scope

TCCR2A = 0; //при совпадении уровень OC1A меняется на противоположный

^~~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:314:3: note: suggested alternative: 'TCCR0A'

TCCR2A = 0; //при совпадении уровень OC1A меняется на противоположный

^~~~~~

TCCR0A

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:315:3: error: 'TCCR2B' was not declared in this scope

TCCR2B = 5; //CLK

^~~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:315:3: note: suggested alternative: 'TCCR0B'

TCCR2B = 5; //CLK

^~~~~~

TCCR0B

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:316:3: error: 'OCR2A' was not declared in this scope

OCR2A = 1;

^~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:316:3: note: suggested alternative: 'OCR3A'

OCR2A = 1;

^~~~~

OCR3A

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:317:3: error: 'TIMSK2' was not declared in this scope

TIMSK2 = 2; //разрешаем прерывание по совпадению

^~~~~~

C:\Arduino\Nano\libraries\GyverHacks\GyverHacks.cpp:317:3: note: suggested alternative: 'TIMSK0'

TIMSK2 = 2; //разрешаем прерывание по совпадению

^~~~~~

TIMSK0

exit status 1
Ошибка компиляции для платы Arduino Leonardo.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Для RGB:
C:\Users\7272~1\AppData\Local\Temp\ccKYCMe6.ltrans0.ltrans.o: In function `setRGB':

C:\Arduino\Nano\libraries\GyverRGB/GyverRGB.cpp:427: undefined reference to `pwmWrite(unsigned char, unsigned char)'

C:\Arduino\Nano\libraries\GyverRGB/GyverRGB.cpp:428: undefined reference to `pwmWrite(unsigned char, unsigned char)'

C:\Arduino\Nano\libraries\GyverRGB/GyverRGB.cpp:429: undefined reference to `pwmWrite(unsigned char, unsigned char)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Ошибка компиляции для платы Arduino Leonardo.
 

ruslanin

✩✩✩✩✩✩✩
12 Фев 2020
2
2
Эх, и под ESP8266 тоже не получается использовать GyverRGB