I don't understand the error message!

The sketch is attached to the message.

The error message is:
Arduino:1.6.1 (Windows 8.1), Scheda:"Arduino Uno"

Opzioni di compilazione cambiate, ricompilo tutto

Uso la libreria Servo nella cartella: C:\Program Files (x86)\Arduino\libraries\Servo

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -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\libraries\Servo\src C:\Users\Gianni\AppData\Local\Temp\build2265934850885722727.tmp\prova_completo_1.cpp -o C:\Users\Gianni\AppData\Local\Temp\build2265934850885722727.tmp\prova_completo_1.cpp.o

prova_completo_1.ino: In function 'void loop()':

prova_completo_1.ino:57:48: error: 'soglia' was not declared in this scope

prova_completo_1.ino:65:47: error: 'soglia' was not declared in this scope

prova_completo_1.ino:78:48: error: 'soglia' was not declared in this scope

prova_completo_1.ino:86:47: error: 'soglia' was not declared in this scope

Errore durante la compilazione

prova_completo_1.ino (2.12 KB)

You have declared soglia in the setup() function so it is only available to be used (in scope) in the setup() function. Consider making it a global variable like media for instance.

UKHeliBob:
You have declared soglia in the setup() function so it is only available to be used (in scope) in the setup() function. Consider making it a global variable like media for instance.

TY man!