Hi, i get the following error message when i add these libraries, and i have completely updated the latest version of AVR boards in the board manager:
Arduino: 1.8.13 (Linux), Board: "Arduino Uno"
arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/pige_boi/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/pige_boi/.arduino15/packages -libraries /home/pige_boi/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10813 -build-path /tmp/arduino_build_358663 -warnings=none -build-cache /tmp/arduino_cache_46341 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/pige_boi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/pige_boi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/home/pige_boi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/pige_boi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/pige_boi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/pige_boi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /home/pige_boi/Arduino/pinSELECT/pinSELECT.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/pige_boi/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/pige_boi/.arduino15/packages -libraries /home/pige_boi/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10813 -build-path /tmp/arduino_build_358663 -warnings=none -build-cache /tmp/arduino_cache_46341 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/pige_boi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/pige_boi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/home/pige_boi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/pige_boi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/pige_boi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/pige_boi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /home/pige_boi/Arduino/pinSELECT/pinSELECT.ino
Using board 'uno' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Using core 'arduino' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Detecting libraries used...
"/usr/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 "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp" -o "/dev/null"
"/usr/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 "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "-I/usr/share/arduino/hardware/arduino/avr/libraries/SPI/src" "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp" -o "/dev/null"
"/usr/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 "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "-I/usr/share/arduino/hardware/arduino/avr/libraries/SPI/src" "-I/home/pige_boi/Arduino/libraries/SD/src" "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp" -o "/dev/null"
Using cached library dependencies for file: /usr/share/arduino/hardware/arduino/avr/libraries/SPI/src/SPI.cpp
Using cached library dependencies for file: /home/pige_boi/Arduino/libraries/SD/src/File.cpp
Using cached library dependencies for file: /home/pige_boi/Arduino/libraries/SD/src/SD.cpp
Using cached library dependencies for file: /home/pige_boi/Arduino/libraries/SD/src/utility/Sd2Card.cpp
Using cached library dependencies for file: /home/pige_boi/Arduino/libraries/SD/src/utility/SdFile.cpp
Using cached library dependencies for file: /home/pige_boi/Arduino/libraries/SD/src/utility/SdVolume.cpp
Generating function prototypes...
"/usr/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 "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "-I/usr/share/arduino/hardware/arduino/avr/libraries/SPI/src" "-I/home/pige_boi/Arduino/libraries/SD/src" "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp" -o "/tmp/arduino_build_358663/preproc/ctags_target_for_gcc_minus_e.cpp"
"/usr/bin/arduino-ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_358663/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/usr/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 "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "-I/usr/share/arduino/hardware/arduino/avr/libraries/SPI/src" "-I/home/pige_boi/Arduino/libraries/SD/src" "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp" -o "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp.o"
Compiling libraries...
Compiling library "SPI"
Using previously compiled file: /tmp/arduino_build_358663/libraries/SPI/SPI.cpp.o
Compiling library "SD"
Using previously compiled file: /tmp/arduino_build_358663/libraries/SD/File.cpp.o
Using previously compiled file: /tmp/arduino_build_358663/libraries/SD/SD.cpp.o
Using previously compiled file: /tmp/arduino_build_358663/libraries/SD/utility/Sd2Card.cpp.o
Using previously compiled file: /tmp/arduino_build_358663/libraries/SD/utility/SdFile.cpp.o
Using previously compiled file: /tmp/arduino_build_358663/libraries/SD/utility/SdVolume.cpp.o
Compiling core...
Using precompiled core
Linking everything together...
"/usr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "/tmp/arduino_build_358663/pinSELECT.ino.elf" "/tmp/arduino_build_358663/sketch/pinSELECT.ino.cpp.o" "/tmp/arduino_build_358663/libraries/SPI/SPI.cpp.o" "/tmp/arduino_build_358663/libraries/SD/File.cpp.o" "/tmp/arduino_build_358663/libraries/SD/SD.cpp.o" "/tmp/arduino_build_358663/libraries/SD/utility/Sd2Card.cpp.o" "/tmp/arduino_build_358663/libraries/SD/utility/SdFile.cpp.o" "/tmp/arduino_build_358663/libraries/SD/utility/SdVolume.cpp.o" "/tmp/arduino_build_358663/../arduino_cache_46341/core/core_arduino_avr_uno_1621df717313d057c92202babd71649a.a" "-L/tmp/arduino_build_358663" -lm
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x8009ad of /tmp/arduino_build_358663/pinSELECT.ino.elf section `.bss' is not within region `data'
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x8009ad of /tmp/arduino_build_358663/pinSELECT.ino.elf section `.bss' is not within region `data'
collect2: error: ld returned 1 exit status
Using library SPI at version 1.0 in folder: /usr/share/arduino/hardware/arduino/avr/libraries/SPI
Using library SD at version 1.3.0 in folder: /home/pige_boi/Arduino/libraries/SD
exit status 1
Error compiling for board Arduino Uno.
Here is my sketch, which compiles and uploads no issue without these libraries:
#include <SPI.h>
#include <SD.h>
unsigned long counterA[]={4294967296,4294967296,4294967296,4294967296,4294967296,4294967296};
unsigned long counterB[]={0,0,0,0,0,0};
int Pin[]={1,1,1,1,1,1};
String PinSelected="A0";
int sensorVal[]= {0,0,0,0,0,0};
int sensorVal0=0;
int sensorVal1=0;
int sensorVal2=0;
int sensorVal3=0;
int sensorVal4=0;
int sensorVal5=0;
int Switch[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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MIN=5000.00;
int Y = 10;
float X=5000.00;
int inByte = 0;
String Outputtext;
int DelayTimes[]={0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210};
int d[]={200,200,200,200,200,200,170,80,140,200};
void setup() {
Serial.begin(115200);
pinMode(9,OUTPUT);
pinMode(8,OUTPUT);
pinMode(7,OUTPUT);
pinMode(6,OUTPUT);
}
void loop() {
CheckPins();
delay(Y);
GetVoltage();
delay(Y);
FindMin();
delay(Y);
if(Switch[7]==0){CheckPins();
PrintVoltageScript();}
if(Switch[7]==1){CheckPins();
GetVoltageDiffs();
delay(Y);
PrintVoltageDiffScript();
}
if(Switch[1]==1){
digitalWrite(8, HIGH);
delay(10);
digitalWrite(8, LOW);
delay(10);
digitalWrite(8, HIGH);
}else{digitalWrite(8, LOW);}
if(Switch[4]==1){
// turn LED on:
digitalWrite(6, HIGH);
delay(10);
digitalWrite(6, LOW);
delay(10);
digitalWrite(6, HIGH);
}else{digitalWrite(6, LOW);}
if(Switch[2]==1){
// turn LED on:
digitalWrite(7, HIGH);
delay(10);
digitalWrite(7, LOW);
delay(10);
digitalWrite(7, HIGH);
}else{digitalWrite(7, LOW);}
if(Switch[3]==1){
digitalWrite(9, HIGH);
delay(10);
digitalWrite(9, LOW);
delay(10);
digitalWrite(9, HIGH);
}else{digitalWrite(9, LOW);}
}
void GetVoltageDiffs(){
for (int i = 0; i < 6; i++){
sensorVal[i]=analogRead(i);
delay(Y);
volts2[i]=sensorVal[i]* (X / 1023.0);
}
}
void PrintVoltageDiffScript(){
String output_text="";
for (int i = 0; i < 6; i++){
if(i<=4){
output_text+=String(float(volts2[i]-volts1[i])*Pin[i]);
output_text+=",";
}
if(i>4){output_text+=String(float(volts2[i]-volts1[i])*Pin[i]);}
}
Serial.println(output_text);}
void GetVoltage(){
for (int i = 0; i < 6; i++){
sensorVal[i]=analogRead(i);
delay(Y);
volts1[i]=sensorVal[i]* (X / 1023.0);
}
}
void FindMin(){
for (int j = 0; j < 6; j++){for (int i = 0; i < 6; i++){
MIN=min(MIN,min(volts1[i],volts1[j]));
}}
}
void PrintVoltageScript(){
String output_text="";
for (int i = 0; i < 6; i++){
if(i<=4){
output_text+=String(float(volts1[i])*Pin[i]+MIN*(1-Pin[i]));
output_text+=",";
}
if(i>4){output_text+=String(float(volts1[i])*Pin[i]+MIN*(1-Pin[i]));}
}
Serial.println(output_text);
}
void CheckPins(){
if (Serial.available() > 0) {
char inChar = char(int(Serial.read()));
inByte = int(Serial.read());
for (int i = 0; i < 6; i++){
if(inChar==char(48+i)){Pin[i]=((-1)^(Pin[i]))+2;}
}
if(inChar=='d'){
Switch[7]=((-1)^(Switch[7]))+2;
}
if(inChar=='m'){
Switch[9]=((-1)^(Switch[9]))+2;
}
if (inChar=='6'){
Switch[4]=((-1)^(Switch[4]))+2;}
if (inChar=='7'){
Switch[2]=((-1)^(Switch[2]))+2;}
if (inChar=='8'){
Switch[1]=((-1)^(Switch[1]))+2;}
if (inChar=='9'){
Switch[3]=((-1)^(Switch[3]))+2;}
}
}
I'm really sorry if my sketch isn't properly formatted i only just started getting back into things and im not a professional to say the least