Cd player controller

I’m trying to convert a old DVD drive into a CD player and trying to make project out of this site :
http://singlevalve.web.fc2.com/Atapiduino/atapiduino.htm

But have some problems with compiling this program

#include <Wire.h> // I2C bus library

// This sketch uses F Malpartida’s NewLiquidCrystal library. Obtain from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal
#include <LiquidCrystal_I2C.h> // I2C LCD library

// Start of Definitions
// ####################

// I/O expander addresses:
const int DataL = 0x20; // IDE DD0-DD7
const int DataH = 0x21; // IDE DD8-DD15
const int RegSel = 0x22; // IDE register
const int LCD_I2C_ADDR = 0x27; // LCD (SainSmart 1602)

/* Note that the ‘pins’ in the following LCD definitions are not IC pins numbers
but rather specify the PCF8574 I/O port numbers: P0 to P7. E.g. LCD ‘En’ pin is
connected to port P2 of PCF8574 so En_pin = 2. */

const byte BACKLIGHT_PIN = 3;
const byte En_pin = 2;
const byte Rw_pin = 1;
const byte Rs_pin = 0;
const byte D4_pin = 4;
const byte D5_pin = 5;
const byte D6_pin = 6;
const byte D7_pin = 7;

LiquidCrystal_I2C lcd(LCD_I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

// IDE Register addresses
const byte DataReg = 0xF0; // Addr. Data register of IDE device.
const byte ErrFReg = 0xF1; // Addr. Error/Feature (rd/wr) register of IDE device.
const byte SecCReg = 0xF2; // Addr. Sector Count register of IDE device.
const byte SecNReg = 0xF3; // Addr. Sector Number register of IDE device.
const byte CylLReg = 0xF4; // Addr. Cylinder Low register of IDE device.
const byte CylHReg = 0xF5; // Addr. Cylinder High register of IDE device.
const byte HeadReg = 0xF6; // Addr. Device/Head register of IDE device.
const byte ComSReg = 0xF7; // Addr. Command/Status (wr/rd) register of IDE device.
const byte AStCReg = 0xEE; // Addr. Alternate Status/Device Control (rd/wr) register of IDE device.

// Program Variables
byte dataLval; // dataLval and dataHval hold data from/to
byte dataHval; // D0-D15 of IDE
byte regval; // regval holds addr. of reg. to be addressed on IDE
byte reg; // Holds the addr. of the IDE register with adapted
// nDIOR/nDIOW/nRST values to suit purpose.
byte cnt; // packet byte counter
byte idx; // index used as pointer within packet array
byte paclen = 12; // Default packet length
byte s_trck; // Holds start track
byte e_trck; // Holds end track
byte c_trck; // Follows current track while reading TOC
byte c_trck_m; // MSF values for current track
byte c_trck_s;
byte c_trck_f;
byte a_trck = 1; // Holds actual track from reading subchannel data
byte MFS_M; // Holds actual M value from reading subchannel data
byte MFS_S; // Holds actual S value from reading subchannel data
byte d_trck; // Destination track
byte d_trck_m; // MSF values for destination track
byte d_trck_s;
byte d_trck_f;
byte aud_stat = 0xFF; // subchannel data: 0x11=play, 0x12=pause, 0x15=stop
byte asc;
long prev_millis=0;
long interval=100;
boolean toc;

// Array containing sets of 16 byte packets corresponding to part of the CD-ROM
// ATAPI function set. If the IDE device only supports packets with 12 byte length
// the last 4 bytes are not sent. The great majority of tested devices use 12 byte.

byte fnc= {
0x1B,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=0 Open tray
0x1B,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=16 Close tray
0x1B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=32 Stop unit
0x47,0x00,0x00,0x10,0x28,0x05,0x4C,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=48 Start PLAY
0x4B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=64 PAUSE play
0x4B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=80 RESUME play
0x43,0x02,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=96 Read TOC
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=112 unit ready
0x5A,0x00,0x01,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=128 mode sense
0x42,0x02,0x40,0x01,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=144 rd subch.
0x03,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=160 req. sense
0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // idx=176 Stop disk
};

// Arduino pin assignments:
const byte LED = 13;
const byte NEXT = 12; // NEXT button
const byte EJCT = 11; // EJECT button, open/close CD-ROM tray
const byte STOP = 10; // STOP button
const byte PLAY = 9; // PLAY button
const byte PREV = 8; // PREV button

// End of Definitions ########################################################################

void setup(){

// LCD Part
// ########
lcd.begin (16,2); // init LCD interface
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
lcd.home (); // set cursor to home position

// Arduino Part
// #############

// start I2C interface as Master
Wire.begin();

// Set all pins of all PCF8574 to high impedance inputs.
highZ();

// Start Serial Interface
// Serial.begin(9600);

// initialize the push button pins as inputs with pullup:
pinMode(NEXT, INPUT);
pinMode(PREV, INPUT);
pinMode(EJCT, INPUT);
pinMode(STOP, INPUT);
pinMode(PLAY, INPUT);
pinMode(LED, OUTPUT);

digitalWrite(NEXT, HIGH);
digitalWrite(PREV, HIGH);
digitalWrite(EJCT, HIGH);
digitalWrite(STOP, HIGH);
digitalWrite(PLAY, HIGH);
digitalWrite(LED, LOW);

// IDE Initialisation Part
// ########################

lcd.print(“CDP”);
lcd.setCursor (0,1); // cursor to beginning of LCD 2nd. line
lcd.print(“Pedro Industries”);

reset_IDE(); // Do hard reset
delay(3000); // This delay waits for the drive to initialise
BSY_clear_wait(); // The ATAPI spec. allows drives to take up to
DRY_set_wait(); // 31 sec. but all tested where alright within 3s.
lcd.clear();
readIDE(CylLReg); // Check device signature for ATAPI capability
if(dataLval == 0x14){
readIDE(CylHReg);
if(dataLval == 0xEB){
lcd.print(“Found ATAPI Dev.”);
}
}else{
lcd.print(“No ATAPI Device!”);
while(1); // No need to go ahead.
}
writeIDE(HeadReg, 0x00, 0xFF); // Set Device to Master (Device 0)

// Initialise task file
// ####################
init_task_file();

// Run Self Diagnostic
// ###################
delay(3000);
lcd.clear ();
lcd.print("Self Diag. ");
writeIDE(ComSReg, 0x90, 0xFF); // Issue Run Self Diagnostic Command
readIDE(ErrFReg);
if(dataLval == 0x01){
lcd.print(“OK”);
}else{
lcd.print(“Fail”); // Units failing this may still work fine
}
delay(3000);
lcd.clear ();
lcd.print(“ATAPI Device:”);
lcd.setCursor (0,1);
// Identify Device
// ###############
writeIDE (ComSReg, 0xA1, 0xFF); // Issue Identify Device Command
delay(500); // Instead of wait for IRQ. Needed by some dev.
// readIDE(AStCReg); //
do{
readIDE(DataReg);
if (cnt == 0){ // Get supported packet lenght
if(dataLval & (1<<0)){ // contained in lower byte of first word
paclen = 16; // 1st bit set → use 16 byte packets
}
}
if(cnt > 26 & cnt < 47){ // Read Model
lcd.print(dataHval);
lcd.print(dataLval);
// Serial.print(dataHval);
// Serial.print(dataLval);
}
cnt++;
readIDE(ComSReg); // Read Status Register and check DRQ,
} while(dataLval & (1<<3)); // skip rest of data until DRQ=0
readIDE(AStCReg);
DRQ_clear_wait();

// Check if unit ready
// ###################
unit_ready(); // Send packet ‘test unit ready’
req_sense(); // Send packet ‘Request Sense’
if(asc == 0x29){ // Req. Sense returns ‘HW Reset’
unit_ready(); // (ASC=29h) at first since we had one.
req_sense(); // New Req. Sense returns if media
} // is present or not.
do{
unit_ready(); // Wait until drive is ready.
req_sense(); // Some devices take some time
}while(asc == 0x04); // ASC=04h → LOGICAL DRIVE NOT READY
}

// ############
// End of setup
// ############

// This part reads the push buttons, checks device audio status, interprets operator commands
// and displays the corresponding data depending on the status and/or the commands resulting
// from pressing the push buttons.

void loop(){
// Scan push buttons
if(digitalRead(EJCT) == LOW){
lcd.clear();
toc=false; // Set toc invalid
switch(chck_disk()) {
case 0x00: // If disk in tray case
lcd.print(" OPEN");
eject();
break;
case 0xFF: // If tray closed but no disk in case
eject();
lcd.print(" OPEN");
break;
case 0X71: // If tray open → close it
lcd.print(" LOAD");
load();
}
lcd.clear();
a_trck = s_trck; // Reset to start track
}

if(digitalRead(STOP) == LOW){
a_trck=s_trck; // Reset to start track
stop_disk(); // Stop Disk
stop(); // Stop unit
toc=false;
}

if(digitalRead(PLAY) == LOW){ // Play has been pressed
switch(aud_stat){
case 0x15: // If stopped
play(); // start play
break;
case 0x12: // if paused
resume(); // resume play
break;
case 0x11: // if playing
pause(); // pause playback
}
toc=false; // mark TOC unknown in case disk
lcd.clear(); // is removed using device eject buton
} // while play in progress

if(digitalRead(NEXT) == LOW){
a_trck = a_trck + 1; // a_track becomes next track
if(a_trck > e_trck){(a_trck = s_trck);} // over last track? → point to start track
get_TOC(); // Get MSF for a_trck
fnc[51] = d_trck_m; // Store new play start position
fnc[52] = d_trck_s; // in play packet and start play
fnc[53] = d_trck_f;
play();
if(aud_stat == 0x12 | // If paused or stopped → pause
aud_stat == 0x15)
{
pause();
}
lcd.clear();
}

if(digitalRead(PREV) == LOW){ // Basically like the NEXT function above
a_trck = a_trck - 1; // only backwards
if(a_trck < s_trck){(a_trck = e_trck);}
get_TOC();
fnc[51] = d_trck_m;
fnc[52] = d_trck_s;
fnc[53] = d_trck_f;
play();
if(aud_stat == 0x12 |
aud_stat == 0x15)
{
pause();
}
lcd.clear();
}

if(millis()-prev_millis > interval){ // This part will periodically check the
read_subch_cmd(); // current audio status and update the display
if(aud_stat==0x11){ // accordingly.
lcd.home();
lcd.print(" PLAY “);
curr_MSF(); // Display pickup position
}
if(aud_stat==0x12){
lcd.home();
lcd.print(” PAUSE “);
curr_MSF();
}
if(aud_stat==0x15 & !toc){ // If stopped and TOC invalid
get_TOC(); // try to read TOC
Disp_CD_data(); // display TOC data and set TOC valid
toc=true; // to prevent reading over and over
}
if(aud_stat==0x00){ // Audio status 0 covers all other posible
lcd.clear(); // states not decoded by this sketch and
lcd.print(” NO DISC"); // handles them as NO DISC.
}
prev_millis=millis();
}
}

// #######################################
// Auxiliary functions for displaying data
// #######################################

void Disp_CD_data(){ // Used to display track range and
lcd.clear(); // Total playing time as recovered
lcd.print(“Tracks “); // from reading the TOC
lcd.print(s_trck, DEC);
lcd.print(”-”);
lcd.print(e_trck, DEC);
lcd.setCursor (0,1);
lcd.print(“Time “);
lcd.print(fnc[54], DEC);
lcd.print(”:”);
if(fnc[55] < 10)
{
lcd.print(“0”); // Print a leading 0 for seconds when below 10
}
lcd.print(fnc[55], DEC);
}

void curr_MSF(){ // During PLAY or PAUSE operation show the pickup
lcd.setCursor (2,1); // position as absolute playing time
lcd.print(a_trck, DEC);
lcd.setCursor (11,1);
lcd.print(MFS_M,DEC);
lcd.print(":");
if(MFS_S < 10)
{
lcd.print(“0”); // Print a leading 0 for seconds when below 10
}
lcd.print(MFS_S,DEC);
}
// ##################################
// Auxiliary functions User Interface
// ##################################

void play(){
idx = 48; // pointer to play function and Play
SendPac(); // from MSF location stored at idx=(51-56)
} // See also doc. sff8020i table 76
void stop(){
idx = 32; // pointer to stop unit function
SendPac();
}
void eject(){
idx = 0; // pointer to eject function
SendPac();
}
void load(){
idx = 16; // pointer to load
SendPac();
}
void pause(){
idx = 64; // pointer to hold
SendPac();
}
void resume(){
idx = 80; // pointer to resume
SendPac();
}
void stop_disk(){
idx = 176; // pointer to stop disk function
SendPac();
}

// ###########################
// Auxiliary functions PCF8475
// ###########################

// Set to high impedance all ports of PCF8475 interfacing to IDE.
void highZ(){
Wire.beginTransmission(RegSel); // address IDE Register interface
Wire.write(255); // queue FFh into buffer for setting all pins HIGH
Wire.endTransmission(); // transmit buffered data to IDE Register interface
Wire.beginTransmission(DataH); // address IDE DD8-DD15
Wire.write(255); // as above
Wire.endTransmission(); //
Wire.beginTransmission(DataL); // address IDE DD0-DD7
Wire.write(255); // as above
Wire.endTransmission(); //
}

// Reset Device
void reset_IDE(){
Wire.beginTransmission(RegSel);
Wire.write(B11011111); // Bit 5 LOW to reset IDE via nRESET
Wire.endTransmission();
delay(40);
Wire.beginTransmission(RegSel);
Wire.write(B11111111); // Release reset
Wire.endTransmission();
delay(20);
}

// Read one word from IDE register
void readIDE (byte regval){
reg = regval & B01111111; // set nDIOR bit LOW preserving register address
Wire.beginTransmission(RegSel);
Wire.write(reg);
Wire.endTransmission();
Wire.requestFrom(DataH, 1);
dataHval = Wire.read();
Wire.requestFrom(DataL, 1);
dataLval = Wire.read();
highZ(); // set all I/O pins to HIGH → impl. nDIOR release
}

// Write one word to IDE register
void writeIDE (byte regval, byte dataLval, byte dataHval){
reg = regval | B01000000; // set nDIOW bit HIGH preserving register address
Wire.beginTransmission(RegSel);
Wire.write(reg);
Wire.endTransmission();
Wire.beginTransmission(DataH); // send data for IDE D8-D15
Wire.write(dataHval);
Wire.endTransmission();
Wire.beginTransmission(DataL); // send data for IDE D0-D7
Wire.write(dataLval);
Wire.endTransmission();
reg = regval & B10111111; // set nDIOW LOW preserving register address
Wire.beginTransmission(RegSel);
Wire.write(reg);
Wire.endTransmission();
highZ(); // All I/O pins to high impedance → impl. nDIOW release
}

// #################################################
// Auxiliary functions ATAPI Status Register related
// #################################################

// Wait for BSY clear
void BSY_clear_wait(){
do{
readIDE(ComSReg);
} while(dataLval & (1<<7));
}

// Wait for DRQ clear
void DRQ_clear_wait(){
do{
readIDE(ComSReg);
} while(dataLval & (1<<3));
}

// Wait for DRQ set
void DRQ_set_wait(){
do{
readIDE(ComSReg);
}while((dataLval & ~(1<<3)) == true);
}

// Wait for DRY set
void DRY_set_wait(){
do{
readIDE(ComSReg);
}while((dataLval & ~(1<<6)) == true);
}

// ##################################
// Auxiliary functions Packet related
// ##################################

// Send a packet starting at fnc array position idx
void SendPac(){
writeIDE (AStCReg, B00001010, 0xFF); // Set nIEN before you send the PACKET command!
writeIDE(ComSReg, 0xA0, 0xFF); // Write Packet Command Opcode
delay(400);
for (cnt=0;cnt<paclen;cnt=cnt+2){ // Send packet with length of ‘paclen’
dataLval = fnc[(idx + cnt)]; // to IDE Data Registeraccording to idx value
dataHval = fnc[(idx + cnt + 1)];
writeIDE(DataReg, dataLval, dataHval);
readIDE(AStCReg); // Read alternate stat reg.
readIDE(AStCReg); // Read alternate stat reg.
}
BSY_clear_wait();
}

void get_TOC(){
idx = 96; // Pointer to Read TOC Packet
SendPac(); // Send read TOC command packet
delay(10);
DRQ_set_wait();
read_TOC(); // Fetch result
}

void read_TOC(){
readIDE(DataReg); // TOC Data Length not needed, don’t care
readIDE(DataReg); // Read first and last session
s_trck = dataLval;
e_trck = dataHval;
do{
readIDE(DataReg); // Skip Session no. ADR and control fields
readIDE(DataReg); // Read curent track number
c_trck = dataLval;
readIDE(DataReg); // Read M
c_trck_m = dataHval; // Store M of curent track
readIDE(DataReg); // Read S and F
c_trck_s = dataLval; // Store S of current track
c_trck_f = dataHval; // Store F of current track

       if (c_trck == s_trck){              // Store MSF of first track
           fnc[51] = c_trck_m;             // 
           fnc[52] = c_trck_s;
           fnc[53] = c_trck_f;            
       }           
       if (c_trck == a_trck){              // Store MSF of actual track
           d_trck_m = c_trck_m;            // 
           d_trck_s = c_trck_s;
           d_trck_f = c_trck_f;            
       }                      
       if (c_trck == 0xAA){                // Store MSF of end position
           fnc[54] = c_trck_m;
           fnc[55] = c_trck_s;
           fnc[56] = c_trck_f;
       }
       readIDE(ComSReg);
    } while(dataLval & (1<<3));            // Read data from DataRegister until DRQ=0

}

void read_subch_cmd(){
idx=144; // Pointer to read Subchannel Packet
SendPac(); // Send read Subchannel command packet
readIDE(DataReg); // Get Audio Status
if(dataHval==0x13){ // Play operation successfully completed
dataHval=0x15; // means drive is neither paused nor in play
} // so treat as stopped
if(dataHval==0x11| // playing
dataHval==0x12| // paused
dataHval==0x15) // stopped
{aud_stat=dataHval; //
}else{
aud_stat=0; // all other values will report “NO DISC”
}
readIDE(DataReg); // Get (ignore) Subchannel Data Length
readIDE(DataReg); // Get (ignore) Format Code, ADR and Control
readIDE(DataReg); // Get actual track
a_trck = dataLval;
readIDE(DataReg); // Get M field of actual MFS data and
MFS_M = dataHval; // store M it
readIDE(DataReg); // get S and F fields
MFS_S = dataLval; // Store S value
do{
readIDE(DataReg);
readIDE(ComSReg);
} while(dataLval & (1<<3)); // Read rest of data from Data Reg. until DRQ=0
}

byte chck_disk(){
byte disk_ok = 0xFF; // assume no valid disk present.
idx = 128; // Send mode sense packet
SendPac(); //
delay(10);
DRQ_set_wait(); // Wait for data ready to read.
readIDE(DataReg); // Read and discard Mode Sense data length
readIDE(DataReg); // Get Medium Type byte
// If valid audio disk present disk_ok=0x00
if (dataLval == 0x02 |
dataLval == 0x06 |
dataLval == 0x12 |
dataLval == 0x16 |
dataLval == 0x22 |
dataLval == 0x26)
{disk_ok = 0x00;
}
if (dataLval == 0x71){ // Note if door open
disk_ok = 0x71;
}
do{ // Skip rest of packet
readIDE(DataReg);
readIDE(ComSReg);
} while(dataLval & (1<<3));
return(disk_ok);
}

void unit_ready(){ // Reuests unit to report status
idx=112; // used to check_unit_ready
SendPac();
}

void req_sense(){ // Request Sense Command is used to check
idx=160; // the result of the Unit Ready command.
SendPac(); // The Additional Sense Code is used,
delay(10); // see table 71 in sff8020i documentation
DRQ_set_wait();
cnt=0;
do{
readIDE(DataReg);
if (cnt == 6){
asc=dataLval; // Store Additional Sense Code
}
cnt++;
readIDE(AStCReg);
readIDE(ComSReg);
} while(dataLval & (1<<3)); // Skip rest of packet
}

void init_task_file(){
writeIDE(ErrFReg, 0x00, 0xFF); // Set Feature register = 0 (no overlapping and no DMA)
writeIDE(CylHReg, 0x02, 0xFF); // Set PIO buffer to max. transfer length (= 200h)
writeIDE(CylLReg, 0x00, 0xFF);
writeIDE(AStCReg, 0x02, 0xFF); // Set nIEN, we don’t care about the INTRQ signal
BSY_clear_wait(); // When conditions are met then IDE bus is idle,
DRQ_clear_wait(); // this check may not be necessary (???)
}

// END ####################################################################################

error:

Arduino: 1.8.13 (Windows 10), Board: “Arduino Uno”

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\user\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10813 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_308788 -warnings=none -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_893440 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\user\Documents\Arduino\sketch_may03a\sketch_may03a.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\user\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10813 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_308788 -warnings=none -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_893440 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\user\Documents\Arduino\sketch_may03a\sketch_may03a.ino

Using board ‘uno’ from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core ‘arduino’ from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for Wire.h: [Wire@1.0]

ResolveLibrary(Wire.h)

→ candidates: [Wire@1.0]

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for LiquidCrystal_I2C.h: [liquidcrystal]

ResolveLibrary(LiquidCrystal_I2C.h)

→ candidates: [liquidcrystal]

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp

Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c

Generating function prototypes…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\preproc\ctags_target_for_gcc_minus_e.cpp” -DARDUINO_LIB_DISCOVERY_PHASE

“C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “C:\Users\user\AppData\Local\Temp\arduino_build_308788\preproc\ctags_target_for_gcc_minus_e.cpp”

Compiling sketch…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp.o”

Compiling libraries…

Compiling library “Wire”

Using previously compiled file: C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\Wire.cpp.o

Using previously compiled file: C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\utility\twi.c.o

Compiling library “liquidcrystal”

Compiling core…

Using precompiled core: C:\Users\user\AppData\Local\Temp\arduino_cache_893440\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a

Linking everything together…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -w -Os -g -flto -fuse-linker-plugin -Wl,–gc-sections -mmcu=atmega328p -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788/sketch_may03a.ino.elf” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp.o” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\Wire.cpp.o” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\utility\twi.c.o” “C:\Users\user\AppData\Local\Temp\arduino_build_308788/…\arduino_cache_893440\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a” “-LC:\Users\user\AppData\Local\Temp\arduino_build_308788” -lm

C:\Users\user\AppData\Local\Temp\cc4hnkAZ.ltrans0.ltrans.o: In function `curr_MSF’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:392: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:394: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\cc4hnkAZ.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_sketch_may03a.ino.cpp.o.1870’:

:(.text.startup+0x46): undefined reference to `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\cc4hnkAZ.ltrans0.ltrans.o: In function `setup’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:145: undefined reference to `LiquidCrystal_I2C::begin(unsigned char, unsigned char, unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:147: undefined reference to `LiquidCrystal_I2C::setBacklightPin(unsigned char, t_backlightPol)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:148: undefined reference to `LiquidCrystal_I2C::setBacklight(unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:149: undefined reference to `LCD::home()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:182: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:189: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:209: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:219: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:221: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\cc4hnkAZ.ltrans0.ltrans.o: In function `loop’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:272: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:287: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:310: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:326: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:342: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:348: undefined reference to `LCD::home()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:353: undefined reference to `LCD::home()’

C:\Users\user\AppData\Local\Temp\cc4hnkAZ.ltrans0.ltrans.o: In function `Disp_CD_data’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:375: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:380: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\cc4hnkAZ.ltrans0.ltrans.o: In function `loop’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:363: undefined reference to `LCD::clear()’

collect2.exe: error: ld returned 1 exit status

Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

Using library liquidcrystal in folder: C:\Users\user\Documents\Arduino\libraries\liquidcrystal (legacy)

exit status 1

Error compiling for board Arduino Uno.

The easier you make it to read and copy the code the more likely it is that you will get help

Please follow the advice given in the link below when posting code

can’t find the code function

Can’t find it where ?

From the link I posted

I have it only in text files.
And still cant find the code function in the forum

#include <Wire.h>                  // I2C bus library

// This sketch uses F Malpartida's NewLiquidCrystal library. Obtain from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal 
#include <LiquidCrystal_I2C.h>     // I2C LCD library

// Start of Definitions
// ####################

// I/O expander addresses:
const int DataL = 0x20;            // IDE DD0-DD7
const int DataH = 0x21;            // IDE DD8-DD15
const int RegSel = 0x22;           // IDE register
const int LCD_I2C_ADDR = 0x27;     // LCD (SainSmart 1602)

/* Note that the 'pins' in the following LCD definitions are not IC pins numbers
but rather specify the PCF8574 I/O port numbers: P0 to P7. E.g. LCD 'En' pin is 
connected to port P2 of PCF8574 so En_pin = 2. */

const byte BACKLIGHT_PIN = 3;
const byte En_pin = 2;
const byte Rw_pin = 1;
const byte Rs_pin = 0;
const byte D4_pin = 4;
const byte D5_pin = 5;
const byte D6_pin = 6;
const byte D7_pin = 7;

LiquidCrystal_I2C lcd(LCD_I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

// IDE Register addresses
const byte DataReg = 0xF0;         // Addr. Data register of IDE device.
const byte ErrFReg = 0xF1;         // Addr. Error/Feature (rd/wr) register of IDE device.
const byte SecCReg = 0xF2;         // Addr. Sector Count register of IDE device.
const byte SecNReg = 0xF3;         // Addr. Sector Number register of IDE device.
const byte CylLReg = 0xF4;         // Addr. Cylinder Low register of IDE device.
const byte CylHReg = 0xF5;         // Addr. Cylinder High register of IDE device.
const byte HeadReg = 0xF6;         // Addr. Device/Head register of IDE device.
const byte ComSReg = 0xF7;         // Addr. Command/Status (wr/rd) register of IDE device.
const byte AStCReg = 0xEE;         // Addr. Alternate Status/Device Control (rd/wr) register of IDE device.

// Program Variables
byte dataLval;                     // dataLval and dataHval hold data from/to 
byte dataHval;                     // D0-D15 of IDE
byte regval;                       // regval holds addr. of reg. to be addressed on IDE
byte reg;                          // Holds the addr. of the IDE register with adapted
                                   // nDIOR/nDIOW/nRST values to suit purpose.
byte cnt;                          // packet byte counter
byte idx;                          // index used as pointer within packet array
byte paclen = 12;                  // Default packet length
byte s_trck;                       // Holds start track
byte e_trck;                       // Holds end track
byte c_trck;                       // Follows current track while reading TOC
byte c_trck_m;                     // MSF values for current track
byte c_trck_s;
byte c_trck_f;
byte a_trck = 1;                   // Holds actual track from reading subchannel data
byte MFS_M;                        // Holds actual M value from reading subchannel data
byte MFS_S;                        // Holds actual S value from reading subchannel data
byte d_trck;                       // Destination track
byte d_trck_m;                     // MSF values for destination track
byte d_trck_s;
byte d_trck_f;
byte aud_stat = 0xFF;              // subchannel data: 0x11=play, 0x12=pause, 0x15=stop 
byte asc;
long prev_millis=0;
long interval=100;
boolean toc;

// Array containing sets of 16 byte packets corresponding to part of the CD-ROM 
// ATAPI function set. If the IDE device only supports packets with 12 byte length
// the last 4 bytes are not sent. The great majority of tested devices use 12 byte.

byte fnc[]= {
  0x1B,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=0 Open tray
  0x1B,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=16 Close tray
  0x1B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=32 Stop unit
  0x47,0x00,0x00,0x10,0x28,0x05,0x4C,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=48 Start PLAY
  0x4B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=64 PAUSE play
  0x4B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=80 RESUME play
  0x43,0x02,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=96 Read TOC
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=112 unit ready
  0x5A,0x00,0x01,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=128 mode sense
  0x42,0x02,0x40,0x01,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=144 rd subch.  
  0x03,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // idx=160 req. sense
  0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00  // idx=176 Stop disk
};

// Arduino pin assignments:
const byte LED = 13;
const byte NEXT = 12;                   // NEXT button
const byte EJCT = 11;                   // EJECT button, open/close CD-ROM tray
const byte STOP = 10;                   // STOP button
const byte PLAY = 9;                    // PLAY button
const byte PREV = 8;                    // PREV button

// End of Definitions ########################################################################

void setup(){

  // LCD Part
  // ########
  lcd.begin (16,2);                                // init LCD interface
  // Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.home ();                                     // set cursor to home position
  
  // Arduino Part
  // #############

  // start I2C interface as Master
  Wire.begin();

  // Set all pins of all PCF8574 to high impedance inputs.
  highZ();

  // Start Serial Interface
//  Serial.begin(9600);

  // initialize the push button pins as inputs with pullup:
  pinMode(NEXT, INPUT);
  pinMode(PREV, INPUT);
  pinMode(EJCT, INPUT);
  pinMode(STOP, INPUT);
  pinMode(PLAY, INPUT);
  pinMode(LED, OUTPUT);

  digitalWrite(NEXT, HIGH);
  digitalWrite(PREV, HIGH);  
  digitalWrite(EJCT, HIGH);
  digitalWrite(STOP, HIGH);
  digitalWrite(PLAY, HIGH);
  digitalWrite(LED, LOW);

// IDE Initialisation Part
// ########################

  lcd.print("CDP");
  lcd.setCursor (0,1);                      // cursor to beginning of LCD 2nd. line
  lcd.print("Pedro Industries");
  
  reset_IDE();                              // Do hard reset
  delay(3000);                              // This delay waits for the drive to initialise
  BSY_clear_wait();                         // The ATAPI spec. allows drives to take up to 
  DRY_set_wait();                           // 31 sec. but all tested where alright within 3s.
  lcd.clear();
  readIDE(CylLReg);                         // Check device signature for ATAPI capability
  if(dataLval == 0x14){
    readIDE(CylHReg);
    if(dataLval == 0xEB){
         lcd.print("Found ATAPI Dev.");
    }
  }else{
         lcd.print("No ATAPI Device!");
         while(1);                          // No need to go ahead.
  }
  writeIDE(HeadReg, 0x00, 0xFF);            // Set Device to Master (Device 0)
  
// Initialise task file
// ####################
   init_task_file();

// Run Self Diagnostic
// ###################
  delay(3000);
  lcd.clear ();
  lcd.print("Self Diag. ");
  writeIDE(ComSReg, 0x90, 0xFF);            // Issue Run Self Diagnostic Command
  readIDE(ErrFReg);
  if(dataLval == 0x01){
    lcd.print("OK");
  }else{
        lcd.print("Fail");            // Units failing this may still work fine
  }
  delay(3000);
  lcd.clear ();
  lcd.print("ATAPI Device:");
  lcd.setCursor (0,1);
// Identify Device
// ###############
  writeIDE (ComSReg, 0xA1, 0xFF);           // Issue Identify Device Command
  delay(500);                               // Instead of wait for IRQ. Needed by some dev.  
//  readIDE(AStCReg); //
  do{
    readIDE(DataReg);
    if (cnt == 0){                                // Get supported packet lenght
      if(dataLval & (1<<0)){                      // contained in lower byte of first word
        paclen = 16;                              // 1st bit set -> use 16 byte packets
      }
    }
    if(cnt > 26 & cnt < 47){                      // Read Model
        lcd.print(dataHval);
        lcd.print(dataLval);
//        Serial.print(dataHval);
//        Serial.print(dataLval);
    }
    cnt++;
    readIDE(ComSReg);                             // Read Status Register and check DRQ,
  } while(dataLval & (1<<3));                     // skip rest of data until DRQ=0
  readIDE(AStCReg);
  DRQ_clear_wait();

// Check if unit ready
// ###################
  unit_ready();                                   // Send packet 'test unit ready'
  req_sense();                                    // Send packet 'Request Sense'
  if(asc == 0x29){                                // Req. Sense returns 'HW Reset' 
    unit_ready();                                 // (ASC=29h) at first since we had one.
    req_sense();                                  // New Req. Sense returns if media
  }                                               // is present or not.
  do{
     unit_ready();                                // Wait until drive is ready.
     req_sense();                                 // Some devices take some time
  }while(asc == 0x04);                            // ASC=04h -> LOGICAL DRIVE NOT READY
}

// ############
// End of setup
// ############


// This part reads the push buttons, checks device audio status, interprets operator commands
// and displays the corresponding data depending on the status and/or the commands resulting
// from pressing the push buttons.

void loop(){
  // Scan push buttons
  if(digitalRead(EJCT) == LOW){
    lcd.clear();
    toc=false;                                    // Set toc invalid
    switch(chck_disk()) {
      case 0x00:                                  // If disk in tray case
      lcd.print("      OPEN");
      eject();
      break;
      case 0xFF:                                  // If tray closed but no disk in case
      eject();
      lcd.print("      OPEN");
      break;      
      case 0X71:                                 // If tray open -> close it
      lcd.print("      LOAD");
      load();
    }
    lcd.clear();
    a_trck = s_trck;                             // Reset to start track
  }
  
  if(digitalRead(STOP) == LOW){
    a_trck=s_trck;                               // Reset to start track
    stop_disk();                                 // Stop Disk
    stop();                                      // Stop unit    
    toc=false;
  }
  
  if(digitalRead(PLAY) == LOW){                  // Play has been pressed
      switch(aud_stat){
         case 0x15:                              // If stopped
         play();                                 // start play
         break;
         case 0x12:                              // if paused
         resume();                               // resume play
         break;
         case 0x11:                              // if playing
         pause();                                // pause playback
      }
    toc=false;                                   // mark TOC unknown in case disk
    lcd.clear();                                 // is removed using device eject buton
  }                                              // while play in progress

  if(digitalRead(NEXT) == LOW){
    a_trck = a_trck + 1;                         // a_track becomes next track
    if(a_trck > e_trck){(a_trck = s_trck);}      // over last track? -> point to start track
    get_TOC();                                   // Get MSF for a_trck
    fnc[51] = d_trck_m;                          // Store new play start position 
    fnc[52] = d_trck_s;                          // in play packet and start play
    fnc[53] = d_trck_f;
    play();
    if(aud_stat == 0x12 |                        // If paused or stopped -> pause
       aud_stat == 0x15)
     {
     pause();
    }
    lcd.clear();
  }
  
  if(digitalRead(PREV) == LOW){                 // Basically like the NEXT function above
    a_trck = a_trck - 1;                        // only backwards
    if(a_trck < s_trck){(a_trck = e_trck);}
    get_TOC();
    fnc[51] = d_trck_m;
    fnc[52] = d_trck_s;
    fnc[53] = d_trck_f;
    play();
    if(aud_stat == 0x12 |
       aud_stat == 0x15)
     {
     pause();
    }
    lcd.clear();    
  }
  
  if(millis()-prev_millis > interval){          // This part will periodically check the
    read_subch_cmd();                           // current audio status and update the display
    if(aud_stat==0x11){                         // accordingly.
      lcd.home();
      lcd.print("      PLAY    ");
      curr_MSF();                               // Display pickup position
    }
    if(aud_stat==0x12){
      lcd.home();
      lcd.print("     PAUSE   ");
      curr_MSF();
    }
    if(aud_stat==0x15 & !toc){                  // If stopped and TOC invalid
      get_TOC();                                // try to read TOC 
      Disp_CD_data();                           // display TOC data and set TOC valid
      toc=true;                                 // to prevent reading over and over
    }
    if(aud_stat==0x00){                         // Audio status 0 covers all other posible
      lcd.clear();                              // states not decoded by this sketch and
      lcd.print("    NO DISC");                 // handles them as NO DISC.
    }
    prev_millis=millis();
  }
}

// #######################################
// Auxiliary functions for displaying data
// #######################################

 void Disp_CD_data(){                          // Used to display track range and
     lcd.clear();                              // Total playing time as recovered
     lcd.print("Tracks  ");                    // from reading the TOC
     lcd.print(s_trck, DEC);
     lcd.print("-");
     lcd.print(e_trck, DEC);
     lcd.setCursor (0,1);
     lcd.print("Time   ");
     lcd.print(fnc[54], DEC);
     lcd.print(":");
      if(fnc[55] < 10)
      {
        lcd.print("0");                         // Print a leading 0 for seconds when below 10
      }
      lcd.print(fnc[55], DEC);
 }

void curr_MSF(){                               // During PLAY or PAUSE operation show the pickup
      lcd.setCursor (2,1);                     // position as absolute playing time
      lcd.print(a_trck, DEC);
      lcd.setCursor (11,1);      
      lcd.print(MFS_M,DEC);
      lcd.print(":");
      if(MFS_S < 10)
      {
        lcd.print("0");                         // Print a leading 0 for seconds when below 10
      }
      lcd.print(MFS_S,DEC);      
}
// ##################################
// Auxiliary functions User Interface
// ##################################

void play(){
    idx = 48;                                     // pointer to play function and Play
    SendPac();                                    // from MSF location stored at idx=(51-56)
}                                                 // See also doc. sff8020i table 76
void stop(){
    idx = 32;                                     // pointer to stop unit function
    SendPac();
}
void eject(){
    idx = 0;                                      // pointer to eject function
    SendPac();
}
void load(){
    idx = 16;                                     // pointer to load
    SendPac();
}
void pause(){
     idx = 64;                                    // pointer to hold
     SendPac();
}
void resume(){
     idx = 80;                                    // pointer to resume
     SendPac();
}
void stop_disk(){
    idx = 176;                                    // pointer to stop disk function
    SendPac();
}

// ###########################
// Auxiliary functions PCF8475 
// ###########################

// Set to high impedance all ports of PCF8475 interfacing to IDE.
void highZ(){
  Wire.beginTransmission(RegSel);       // address IDE Register interface
  Wire.write(255);                       // queue FFh into buffer for setting all pins HIGH
  Wire.endTransmission();               // transmit buffered data to IDE Register interface
  Wire.beginTransmission(DataH);        // address IDE DD8-DD15
  Wire.write(255);                       // as above
  Wire.endTransmission();               //
  Wire.beginTransmission(DataL);        // address IDE DD0-DD7
  Wire.write(255);                       // as above
  Wire.endTransmission();               //
}

// Reset Device
void reset_IDE(){
  Wire.beginTransmission(RegSel);
  Wire.write(B11011111);                // Bit 5 LOW to reset IDE via nRESET
  Wire.endTransmission();
  delay(40);
  Wire.beginTransmission(RegSel);
  Wire.write(B11111111);                // Release reset
  Wire.endTransmission();
  delay(20);
}

// Read one word from IDE register
void readIDE (byte regval){
  reg = regval & B01111111;             // set nDIOR bit LOW preserving register address
  Wire.beginTransmission(RegSel);
  Wire.write(reg);
  Wire.endTransmission();
  Wire.requestFrom(DataH, 1);
  dataHval = Wire.read();
  Wire.requestFrom(DataL, 1);
  dataLval = Wire.read();
  highZ();                              // set all I/O pins to HIGH -> impl. nDIOR release
}

// Write one word to IDE register
void writeIDE (byte regval, byte dataLval, byte dataHval){
  reg = regval | B01000000;             // set nDIOW bit HIGH preserving register address
  Wire.beginTransmission(RegSel);
  Wire.write(reg);
  Wire.endTransmission();
  Wire.beginTransmission(DataH);        // send data for IDE D8-D15
  Wire.write(dataHval);
  Wire.endTransmission();
  Wire.beginTransmission(DataL);        // send data for IDE D0-D7
  Wire.write(dataLval);
  Wire.endTransmission();
  reg = regval & B10111111;             // set nDIOW LOW preserving register address
  Wire.beginTransmission(RegSel);
  Wire.write(reg);
  Wire.endTransmission();
  highZ();                              // All I/O pins to high impedance -> impl. nDIOW release
}

// #################################################
// Auxiliary functions ATAPI Status Register related
// #################################################

// Wait for BSY clear
void BSY_clear_wait(){
  do{
    readIDE(ComSReg);
  } while(dataLval & (1<<7));
}

// Wait for DRQ clear
void DRQ_clear_wait(){
  do{
    readIDE(ComSReg);
  } while(dataLval & (1<<3));
}

// Wait for DRQ set
void DRQ_set_wait(){
     do{
        readIDE(ComSReg);
     }while((dataLval & ~(1<<3)) == true);
}

// Wait for DRY set
void DRY_set_wait(){
     do{
        readIDE(ComSReg);
     }while((dataLval & ~(1<<6)) == true);
}

// ##################################
// Auxiliary functions Packet related
// ##################################

// Send a packet starting at fnc array position idx
void SendPac(){
     writeIDE (AStCReg, B00001010, 0xFF);     // Set nIEN before you send the PACKET command! 
     writeIDE(ComSReg, 0xA0, 0xFF);           // Write Packet Command Opcode
     delay(400);
     for (cnt=0;cnt<paclen;cnt=cnt+2){        // Send packet with length of 'paclen' 
     dataLval = fnc[(idx + cnt)];             // to IDE Data Registeraccording to idx value
     dataHval = fnc[(idx + cnt + 1)];
     writeIDE(DataReg, dataLval, dataHval);
     readIDE(AStCReg);                         // Read alternate stat reg.     
     readIDE(AStCReg);                         // Read alternate stat reg.          
     }
     BSY_clear_wait();
}

void get_TOC(){
       idx =  96;                             // Pointer to Read TOC Packet
       SendPac();                             // Send read TOC command packet
       delay(10);
       DRQ_set_wait();
       read_TOC();                            // Fetch result
}

void read_TOC(){
        readIDE(DataReg);                      // TOC Data Length not needed, don't care
        readIDE(DataReg);                      // Read first and last session
        s_trck = dataLval;
        e_trck = dataHval;        
        do{
           readIDE(DataReg);                   // Skip Session no. ADR and control fields
           readIDE(DataReg);                   // Read curent track number
           c_trck = dataLval;
           readIDE(DataReg);                   // Read M
           c_trck_m = dataHval;                // Store M of curent track
           readIDE(DataReg);                   // Read S and F
           c_trck_s = dataLval;                // Store S of current track
           c_trck_f = dataHval;                // Store F of current track
           
           if (c_trck == s_trck){              // Store MSF of first track
               fnc[51] = c_trck_m;             // 
               fnc[52] = c_trck_s;
               fnc[53] = c_trck_f;            
           }           
           if (c_trck == a_trck){              // Store MSF of actual track
               d_trck_m = c_trck_m;            // 
               d_trck_s = c_trck_s;
               d_trck_f = c_trck_f;            
           }                      
           if (c_trck == 0xAA){                // Store MSF of end position
               fnc[54] = c_trck_m;
               fnc[55] = c_trck_s;
               fnc[56] = c_trck_f;
           }
           readIDE(ComSReg);
        } while(dataLval & (1<<3));            // Read data from DataRegister until DRQ=0
}

void read_subch_cmd(){
        idx=144;                             // Pointer to read Subchannel Packet
        SendPac();                           // Send read Subchannel command packet
        readIDE(DataReg);                    // Get Audio Status
        if(dataHval==0x13){                  // Play operation successfully completed
          dataHval=0x15;                     // means drive is neither paused nor in play
        }                                    // so treat as stopped
        if(dataHval==0x11|                   // playing
           dataHval==0x12|                   // paused
           dataHval==0x15)                   // stopped
           {aud_stat=dataHval;               // 
        }else{
            aud_stat=0;                      // all other values will report "NO DISC"
        }
        readIDE(DataReg);                    // Get (ignore) Subchannel Data Length
        readIDE(DataReg);                    // Get (ignore) Format Code, ADR and Control
        readIDE(DataReg);                    // Get actual track
        a_trck = dataLval;
        readIDE(DataReg);                    // Get M field of actual MFS data and
        MFS_M = dataHval;                    // store M it
        readIDE(DataReg);                    // get S and F fields
        MFS_S = dataLval;                    // Store S value
        do{
          readIDE(DataReg);
          readIDE(ComSReg);
        } while(dataLval & (1<<3));          // Read rest of data from Data Reg. until DRQ=0
}

byte chck_disk(){
     byte disk_ok = 0xFF;                        // assume no valid disk present.
     idx = 128;                                  // Send mode sense packet
     SendPac();                                  // 
     delay(10);
     DRQ_set_wait();                             // Wait for data ready to read.
     readIDE(DataReg);                           // Read and discard Mode Sense data length
     readIDE(DataReg);                           // Get Medium Type byte
                                                 // If valid audio disk present disk_ok=0x00
     if (dataLval == 0x02 | 
         dataLval == 0x06 |
         dataLval == 0x12 |
         dataLval == 0x16 |
         dataLval == 0x22 |
         dataLval == 0x26)
         {disk_ok = 0x00;
     }
     if (dataLval == 0x71){                      // Note if door open
        disk_ok = 0x71;
     }
     do{                                         // Skip rest of packet
       readIDE(DataReg);
       readIDE(ComSReg);
     } while(dataLval & (1<<3));
     return(disk_ok);
}

void unit_ready(){                                // Reuests unit to report status
        idx=112;                                  // used to check_unit_ready
        SendPac();     
}

void req_sense(){                                 // Request Sense Command is used to check
  idx=160;                                        // the result of the Unit Ready command.
  SendPac();                                      // The Additional Sense Code is used,
  delay(10);                                      // see table 71 in sff8020i documentation
  DRQ_set_wait();
  cnt=0;
  do{
       readIDE(DataReg);
       if (cnt == 6){
           asc=dataLval;                          // Store Additional Sense Code
       }
       cnt++;
       readIDE(AStCReg);       
       readIDE(ComSReg);
     } while(dataLval & (1<<3));                  // Skip rest of packet
}

void init_task_file(){
  writeIDE(ErrFReg, 0x00, 0xFF);            // Set Feature register = 0 (no overlapping and no DMA)
  writeIDE(CylHReg, 0x02, 0xFF);            // Set PIO buffer to max. transfer length (= 200h)
  writeIDE(CylLReg, 0x00, 0xFF);
  writeIDE(AStCReg, 0x02, 0xFF);            // Set nIEN, we don't care about the INTRQ signal
  BSY_clear_wait();                         // When conditions are met then IDE bus is idle,
  DRQ_clear_wait();                         // this check may not be necessary (???)
}

// END ####################################################################################

and the error

[code]
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\user\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10813 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_308788 -warnings=none -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_893440 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\user\Documents\Arduino\sketch_may03a\sketch_may03a.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\user\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10813 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_308788 -warnings=none -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_893440 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\user\Documents\Arduino\sketch_may03a\sketch_may03a.ino

Using board ‘uno’ from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core ‘arduino’ from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for Wire.h: [Wire@1.0]

ResolveLibrary(Wire.h)

→ candidates: [Wire@1.0]

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for LiquidCrystal_I2C.h: [liquidcrystal]

ResolveLibrary(LiquidCrystal_I2C.h)

→ candidates: [liquidcrystal]

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c” -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Generating function prototypes…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\preproc\ctags_target_for_gcc_minus_e.cpp” -DARDUINO_LIB_DISCOVERY_PHASE

“C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “C:\Users\user\AppData\Local\Temp\arduino_build_308788\preproc\ctags_target_for_gcc_minus_e.cpp”

Compiling sketch…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp.o”

Compiling libraries…

Compiling library “Wire”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\Wire.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src” “-IC:\Users\user\Documents\Arduino\libraries\liquidcrystal” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\utility\twi.c.o”

Compiling library “liquidcrystal”

Compiling core…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_pulse.S.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\hooks.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\hooks.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\WInterrupts.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_analog.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_analog.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_digital.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_digital.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_pulse.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_shift.c” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_shift.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\CDC.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\CDC.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial0.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial0.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial1.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial1.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial2.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial2.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial3.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial3.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\IPAddress.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\IPAddress.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\PluggableUSB.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\PluggableUSB.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\Print.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\Print.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\Stream.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\Stream.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\Tone.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\Tone.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\USBCore.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\USBCore.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\WMath.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\WMath.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\WString.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\WString.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\abi.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\abi.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\main.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\main.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard” “C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\new.cpp” -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\new.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_pulse.S.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\WInterrupts.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\hooks.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_analog.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_digital.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_pulse.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\wiring_shift.c.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\CDC.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial0.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial1.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial2.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\HardwareSerial3.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\IPAddress.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\PluggableUSB.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\Print.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\Stream.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\Tone.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\USBCore.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\WMath.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\WString.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\abi.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\main.cpp.o”

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar” rcs “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\core.a” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\core\new.cpp.o”

Archiving built core (caching) in: C:\Users\user\AppData\Local\Temp\arduino_cache_893440\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a

Linking everything together…

“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc” -w -Os -g -flto -fuse-linker-plugin -Wl,–gc-sections -mmcu=atmega328p -o “C:\Users\user\AppData\Local\Temp\arduino_build_308788/sketch_may03a.ino.elf” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\sketch\sketch_may03a.ino.cpp.o” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\Wire.cpp.o” “C:\Users\user\AppData\Local\Temp\arduino_build_308788\libraries\Wire\utility\twi.c.o” “C:\Users\user\AppData\Local\Temp\arduino_build_308788/core\core.a” “-LC:\Users\user\AppData\Local\Temp\arduino_build_308788” -lm

C:\Users\user\AppData\Local\Temp\ccfVYjGv.ltrans0.ltrans.o: In function `curr_MSF’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:392: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:394: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\ccfVYjGv.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_sketch_may03a.ino.cpp.o.1870’:

:(.text.startup+0x46): undefined reference to `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\ccfVYjGv.ltrans0.ltrans.o: In function `setup’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:145: undefined reference to `LiquidCrystal_I2C::begin(unsigned char, unsigned char, unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:147: undefined reference to `LiquidCrystal_I2C::setBacklightPin(unsigned char, t_backlightPol)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:148: undefined reference to `LiquidCrystal_I2C::setBacklight(unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:149: undefined reference to `LCD::home()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:182: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:189: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:209: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:219: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:221: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\ccfVYjGv.ltrans0.ltrans.o: In function `loop’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:272: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:287: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:310: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:326: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:342: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:348: undefined reference to `LCD::home()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:353: undefined reference to `LCD::home()’

C:\Users\user\AppData\Local\Temp\ccfVYjGv.ltrans0.ltrans.o: In function `Disp_CD_data’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:375: undefined reference to `LCD::clear()’

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:380: undefined reference to `LCD::setCursor(unsigned char, unsigned char)’

C:\Users\user\AppData\Local\Temp\ccfVYjGv.ltrans0.ltrans.o: In function `loop’:

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:363: undefined reference to `LCD::clear()’

collect2.exe: error: ld returned 1 exit status

Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

Using library liquidcrystal in folder: C:\Users\user\Documents\Arduino\libraries\liquidcrystal (legacy)

exit status 1

Error compiling for board Arduino Uno. [/code]

yes sorry could not find copy error to forum

the compiler tells you

:(.text.startup+0x46): undefined reference to `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

so it doesn’t like your

LiquidCrystal_I2C lcd(LCD_I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

The used library, doesn’t know this kind of constructor (this kind of parameter/parameter order).

This might happen if you have installed several “Liquid Crystal I2C” libraries and different libraries might have different constructors.

The compiler tells you, that it tried to use the library in this folder

C:\Users\user\Documents\Arduino\libraries\liquidcrystal (legacy)

But your comments say
// This sketch uses F Malpartida’s NewLiquidCrystal library.

Easiest way:
Only use ONE LCD I2C library, uninstall the others and use a constructor fitting to the one installed library.

FastIO.h
I2CIO.h
LCD.h
LiquidCrystal.h
LiquidCrystal_I2C.h
SI2CIO.h
SoftI2Cmaster.h
TinyWireM.h
Those are the only liberies I got. I know this program needs some of them but not sure witch one may be the problem.

I tried many combinacions but it's still the same.

Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"

C:\Users\user\AppData\Local\Temp\cc6gByiV.ltrans0.ltrans.o: In function `curr_MSF':

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:392: undefined reference to `LCD::setCursor(unsigned char, unsigned char)'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:394: undefined reference to `LCD::setCursor(unsigned char, unsigned char)'

C:\Users\user\AppData\Local\Temp\cc6gByiV.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_sketch_may03a.ino.cpp.o.1870':

:(.text.startup+0x46): undefined reference to `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'

C:\Users\user\AppData\Local\Temp\cc6gByiV.ltrans0.ltrans.o: In function `setup':

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:145: undefined reference to `LiquidCrystal_I2C::begin(unsigned char, unsigned char, unsigned char)'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:147: undefined reference to `LiquidCrystal_I2C::setBacklightPin(unsigned char, t_backlightPol)'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:148: undefined reference to `LiquidCrystal_I2C::setBacklight(unsigned char)'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:149: undefined reference to `LCD::home()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:182: undefined reference to `LCD::setCursor(unsigned char, unsigned char)'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:189: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:209: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:219: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:221: undefined reference to `LCD::setCursor(unsigned char, unsigned char)'

C:\Users\user\AppData\Local\Temp\cc6gByiV.ltrans0.ltrans.o: In function `loop':

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:272: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:287: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:310: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:326: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:342: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:348: undefined reference to `LCD::home()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:353: undefined reference to `LCD::home()'

C:\Users\user\AppData\Local\Temp\cc6gByiV.ltrans0.ltrans.o: In function `Disp_CD_data':

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:375: undefined reference to `LCD::clear()'

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:380: undefined reference to `LCD::setCursor(unsigned char, unsigned char)'

C:\Users\user\AppData\Local\Temp\cc6gByiV.ltrans0.ltrans.o: In function `loop':

C:\Users\user\Documents\Arduino\sketch_may03a/sketch_may03a.ino:363: undefined reference to `LCD::clear()'

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

sketch_may03a.ino (27.0 KB)

Is there something wrong with the sketch it self?