I'm using a DC 0-25V voltage meter on the Arduino Uno and would like it to activate another port when it reaches a desired voltage

//Estou fazendo para um sistema de proteção da minha casa e quero que quando o sensor atinga a uma voltagem desejada ele de um pulso para outra porta, por exemplo ligar um led ou ativar um buzzer. mas nao achei nada que me ajudasse a fazer e não estou conseguindo fazer sozinho.

I'm doing it for a protection system in my house and I want that when the sensor reaches a desired voltage it pulses to another door, for example turning on an LED or activating a buzzer. but I didn't find anything that helped me to do it and I'm not able to do it alone.//

/* ======================================================================================================
HARDWARE:

ARDUINO SENSOR DE TENSÃO
VCC //entrada positiva até 25V
GND //terra da entrada

GND //-
A0 // S

ARDUINO DISPLAY I2C

GND //GND
5V //VCC
A4 //SDA
A5 //SCL

--

HARDWARE:

ARDUINO VOLTAGE SENSOR
VCC //positive input up to 25V
GND // input ground

GND //-
A0 // S

ARDUINO DISPLAY I2C

GND //GND
5V //VCC
A4 // SDA
A5 // SCL

====================================================================================================== */
// ======================================================================================================

// --- Bibliotecas - Libraries ---

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// ======================================================================================================

// --- Declaração de Constantes - Declaration of Constants ---

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3, POSITIVE);

// ======================================================================================================

float volts = 0.0;

// ======================================================================================================

void setup()
{

lcd.begin (16,2);
Serial.begin(115200);

lcd.setCursor(0,0);
lcd.print("|");

lcd.setCursor(0,1);
lcd.print("|");

lcd.setCursor(15,0);
lcd.print("|");

lcd.setCursor(15,1);
lcd.print("|");

lcd.setCursor(3,0);
lcd.print("Voltimetro");

lcd.setCursor(6,1);
lcd.print("NHS");

delay(5000);

lcd.clear();

lcd.setCursor(0,0);
lcd.print("|");

lcd.setCursor(0,1);
lcd.print("|");

lcd.setCursor(15,0);
lcd.print("|");

lcd.setCursor(15,1);
lcd.print("|");

lcd.setCursor(4,0);
lcd.print("Voltagem");

}

void loop()
{

volts = analogRead(0)*(5.0/1023.0);

volts = volts*5.0;

Serial.println(volts);

lcd.setCursor(6,1);
lcd.print(volts);

delay(450);

}

Should be:
analogRead(A0)...

And then:

float someVoltage=10.0;
byte whateverPin=6;
pinMode(whateverPin, OUTPUT);
if (volt>someVoltage){
   digitalWrite(whateverPin, HIGH);
}

Wow, it worked, thank you so much, you don't know how much it helped me! It was killing me trying to do this. :joy:

Thanks Build_1971