Проверьте код, ошибка компиляции

Stocky

✩✩✩✩✩✩✩
24 Янв 2020
0
0
Приветствую, нашел скетч на просторах интернета, решил собрать. Но выдает ошибку при компиляции
C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'void Adafruit_CircuitPlayground::playTone(uint16_t, uint16_t, bool)':

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:215:3: error: 'PLLFRQ' was not declared in this scope

PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk

^~~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:215:3: note: suggested alternative: 'PCIFR'

PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk

^~~~~~

PCIFR

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:216:3: error: 'TCCR4A' was not declared in this scope

TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on

^~~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:216:3: note: suggested alternative: 'TCCR0A'

TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on

^~~~~~

TCCR0A

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,

from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28,

from C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:20,

from C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30:

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:216:17: error: 'COM4A0' was not declared in this scope

TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on

^

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:216:17: note: suggested alternative: 'COM0A0'

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:216:31: error: 'PWM4A' was not declared in this scope

TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on

^

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:216:31: note: suggested alternative: 'PWM'

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:217:3: error: 'TCCR4B' was not declared in this scope

TCCR4B = _BV(PWM4X) | scalebits; // PWM invert

^~~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:217:3: note: suggested alternative: 'TCCR0B'

TCCR4B = _BV(PWM4X) | scalebits; // PWM invert

^~~~~~

TCCR0B

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,

from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28,

from C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:20,

from C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30:

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:217:17: error: 'PWM4X' was not declared in this scope

TCCR4B = _BV(PWM4X) | scalebits; // PWM invert

^

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:217:17: note: suggested alternative: 'PWM'

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:218:3: error: 'TCCR4D' was not declared in this scope

TCCR4D = 0; // Fast PWM mode

^~~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:218:3: note: suggested alternative: 'TCCR0A'

TCCR4D = 0; // Fast PWM mode

^~~~~~

TCCR0A

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:219:3: error: 'TCCR4E' was not declared in this scope

TCCR4E = 0; // Not enhanced mode

^~~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:219:3: note: suggested alternative: 'TCCR0A'

TCCR4E = 0; // Not enhanced mode

^~~~~~

TCCR0A

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:220:3: error: 'DT4' was not declared in this scope

DT4 = 0; // No dead time

^~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:220:3: note: suggested alternative: 'DD4'

DT4 = 0; // No dead time

^~~

DD4

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:226:3: error: 'TC4H' was not declared in this scope

TC4H = hi1;

^~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:226:3: note: suggested alternative: 'PC4'

TC4H = hi1;

^~~~

PC4

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:227:3: error: 'OCR4C' was not declared in this scope

OCR4C = lo1; // TOP

^~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:227:3: note: suggested alternative: 'OCR2A'

OCR4C = lo1; // TOP

^~~~~

OCR2A

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:229:3: error: 'OCR4A' was not declared in this scope

OCR4A = lo2; // 50% duty

^~~~~

C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:229:3: note: suggested alternative: 'OCR2A'

OCR4A = lo2; // 50% duty

^~~~~

OCR2A

Несколько библиотек найдено для "Adafruit_CircuitPlayground.h"
Используется: C:\Users\stike\Documents\Arduino\libraries\Adafruit_Circuit_Playground
Не используется: C:\Program
Несколько библиотек найдено для "SPI.h"
Используется: C:\Program
Несколько библиотек найдено для "Wire.h"
Используется: C:\Program
Несколько библиотек найдено для "Adafruit_GFX.h"
Используется: C:\Users\stike\Documents\Arduino\libraries\Adafruit_GFX_Library
Несколько библиотек найдено для "Adafruit_PCD8544.h"
Используется: C:\Users\stike\Documents\Arduino\libraries\Adafruit_PCD8544_Nokia_5110_LCD_library
Несколько библиотек найдено для "TinyGPS++.h"
Используется: C:\Users\stike\Documents\Arduino\libraries\TinyGPSPlus-1.0.2b
Несколько библиотек найдено для "SoftwareSerial.h"
Используется: C:\Program
exit status 1
Ошибка компиляции для платы Arduino Nano.
 

Старик Похабыч

★★★★★✩✩
14 Авг 2019
1,708
417
Москва
Этот код скорее всего рассчитан на ардуино леонардор или что то подобное. попробуй скоспилировать его для нее.