I've been trying for multiple hours to adjust libraries in order to get this code for an I2C LCD to work and I just can't seem to fix this one error message. It appears the library exists within the Windows Apps which I cannot access. Here is the error message:
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno"
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'void Adafruit_CircuitPlayground::playTone(uint16_t, uint16_t, bool)':
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:238:3: error: 'PLLFRQ' was not declared in this scope
PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:238:3: note: suggested alternative: 'PCIFR'
PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk
^~~~~~
PCIFR
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:3: error: 'TCCR4A' was not declared in this scope
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:3: note: suggested alternative: 'TCCR0A'
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
^~~~~~
TCCR0A
In file included from c:\users\malco\onedrive\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
from c:\users\malco\onedrive\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
from C:\Users\malco\OneDrive\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h:30,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:21,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30:
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:16: error: 'COM4A0' was not declared in this scope
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
^
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:16: note: suggested alternative: 'COM0A0'
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:30: error: 'PWM4A' was not declared in this scope
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
^
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:30: note: suggested alternative: 'PWM'
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:3: error: 'TCCR4B' was not declared in this scope
TCCR4B = _BV(PWM4X) | scalebits; // PWM invert
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:3: note: suggested alternative: 'TCCR0B'
TCCR4B = _BV(PWM4X) | scalebits; // PWM invert
^~~~~~
TCCR0B
In file included from c:\users\malco\onedrive\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
from c:\users\malco\onedrive\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
from C:\Users\malco\OneDrive\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h:30,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:21,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30:
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:16: error: 'PWM4X' was not declared in this scope
TCCR4B = _BV(PWM4X) | scalebits; // PWM invert
^
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:16: note: suggested alternative: 'PWM'
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:241:3: error: 'TCCR4D' was not declared in this scope
TCCR4D = 0; // Fast PWM mode
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:241:3: note: suggested alternative: 'TCCR0A'
TCCR4D = 0; // Fast PWM mode
^~~~~~
TCCR0A
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:242:3: error: 'TCCR4E' was not declared in this scope
TCCR4E = 0; // Not enhanced mode
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:242:3: note: suggested alternative: 'TCCR0A'
TCCR4E = 0; // Not enhanced mode
^~~~~~
TCCR0A
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:243:3: error: 'DT4' was not declared in this scope
DT4 = 0; // No dead time
^~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:243:3: note: suggested alternative: 'DD4'
DT4 = 0; // No dead time
^~~
DD4
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:249:3: error: 'TC4H' was not declared in this scope
TC4H = hi1;
^~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:249:3: note: suggested alternative: 'PC4'
TC4H = hi1;
^~~~
PC4
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:250:3: error: 'OCR4C' was not declared in this scope
OCR4C = lo1; // TOP
^~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:250:3: note: suggested alternative: 'OCR2A'
OCR4C = lo1; // TOP
^~~~~
OCR2A
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:252:3: error: 'OCR4A' was not declared in this scope
OCR4A = lo2; // 50% duty
^~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:252:3: note: suggested alternative: 'OCR2A'
OCR4A = lo2; // 50% duty
^~~~~
OCR2A
exit status 1
Error compiling for board Arduino Uno.
And here is my code as well for reference:
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <LiquidCrystal_I2C.h>
#include <RTClib.h>
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <ArduinoPins.h>
#include <FatReader.h>
#include <FatStructs.h>
#include <mcpDac.h>
#include <SdInfo.h>
#include <SdReader.h>
#include <WaveHC.h>
#include <WavePinDefs.h>
#include <WaveUtil.h>
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_I2C.h>
/*
* This is the Arduino code for Voltage Sensor
* you will measure voltage using this module which eliminate use extra resistors
in the video also you will learn how to measure any voltages.
* Watch the video instruction for Arduino Voltage sensor https://youtu.be/FaoKzi7tgME
* *
* Permission granted to share this code given that this
* note is kept with the code.
* Disclaimer: this code is "AS IS" and for educational purpose only.
*
*/
/*
* Written by Ahmad Shamshiri for Robojax
* on Feb 07, 2018 at 20:05, Ajax, Ontario, Canada
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); //need this text to work
int Gauss;
int offset =06 ;// set the correction offset value
void setup() {
// Robojax.com voltage sensor
Serial.begin(9600);
{
// initialize the LCD
lcd.begin(16,2);
// Turn on the blacklight and print a message.
lcd.backlight();
}
}
void loop() {
// Voltage Sensor
int volt = analogRead(A0);// read the input
double voltage = map(volt,0,1023, 0, 2500) + offset;// map 0-1023 to 0-2500 and add correction offset
voltage /=100;// divide by 100 to get the decimal values
Serial.print("Voltage: ");
Serial.print(voltage);//print the voltge
Serial.println("V");
Gauss = (voltage - 2.5) * 1300;
lcd.setCursor(0,0);
lcd.print("GAUSS");
lcd.setCursor(11,0);
lcd.print(Gauss);
lcd.setCursor(0,1) ;
lcd.print(voltage);
lcd.setCursor(11,1) ;
//if (Gauss < 0)lcd.print("NORTH");
if (voltage < 2.5)lcd.print("NORTH");
else lcd.print("SOUTH");
delay(1000);
lcd.clear();
}