C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\HP\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\HP\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\HP\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\HP\AppData\Local\Temp\arduino_build_547408 -warnings=none -build-cache C:\Users\HP\AppData\Local\Temp\arduino_cache_726584 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\HP\AppData\Local\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=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\HP\Documents\Arduino\sketch_sep13a\sketch_sep13a.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\HP\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\HP\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\HP\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\HP\AppData\Local\Temp\arduino_build_547408 -warnings=none -build-cache C:\Users\HP\AppData\Local\Temp\arduino_cache_726584 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\HP\AppData\Local\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=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\HP\Documents\Arduino\sketch_sep13a\sketch_sep13a.ino
Using board 'uno' from platform in folder: C:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\sketch\sketch_sep13a.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\sketch\sketch_sep13a.ino.cpp" -o "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\preproc\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"C:\Users\HP\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\sketch\sketch_sep13a.ino.cpp" -o "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\sketch\sketch_sep13a.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\wiring_pulse.S.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\wiring_analog.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\WInterrupts.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\hooks.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\wiring.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\wiring_digital.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\wiring_shift.c.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\CDC.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\Print.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\Stream.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\WMath.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\USBCore.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\Tone.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\WString.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\abi.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\new.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\main.cpp.o
Using previously compiled file: C:\Users\HP\AppData\Local\Temp\arduino_build_547408\core\core.a
Archiving built core (caching) in: C:\Users\HP\AppData\Local\Temp\arduino_cache_726584\core\core_arduino_avr_uno_a95e79b39fbf45e26c873bf28fafbeba.a
Linking everything together...
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/sketch_sep13a.ino.elf" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408\sketch\sketch_sep13a.ino.cpp.o" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/core\core.a" "-LC:\Users\HP\AppData\Local\Temp\arduino_build_547408" -lm
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/sketch_sep13a.ino.elf" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/sketch_sep13a.ino.eep"
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/sketch_sep13a.ino.elf" "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/sketch_sep13a.ino.hex"
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\Users\HP\AppData\Local\Temp\arduino_build_547408/sketch_sep13a.ino.elf"
Sketch uses 2316 bytes (7%) of program storage space. Maximum is 32256 bytes.
Global variables use 208 bytes (10%) of dynamic memory, leaving 1840 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync(): can't communicate with device: resp=0x00
An error occurred while uploading the sketch
I tried several things but it is not working`Use code tags to format code for the forum
int soilMoistureValue = 0;
int percentage = 0;
void setup()
{
pinMode(3,OUTPUT);
Serial.begin(9600);
}
void loop()
{
soilMoistureValue=analogRead(A0);
Serial.println(percentage);
percentage = map(soilMoistureValue,490,1023,100,0);
if (percentage<10)
{
Serial.println("pump on");
digitalWrite(3,LOW);
}
if (percentage>80)
{
Serial.println("pump off");
digitalWrite(3,HIGH);
}
}