Values, signal and lcd

Buenas,
Estoy tratando de crear esto que muestro a continuacion:

#include <LiquidCrystal.h>

<LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

int Value1;
int Value2;
int Value3;

void setup() {
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
Serial.begin(9600);
}

void loop() {

Value1 = analogRead(A0);
Value2 = analogRead(A1);
Value3 = analogRead(A2);
{
if (Value1 >= 500) lcd.print("redcablefail");}
{
if (Value2 >= 600) lcd.print("bluecablefail");
}

}>

Cuando utilizo Value1 solamente me da la senal bien y se muestra en el lcd perfecto, pero cuando utilizo dos if, me muestra los dos valores en la pantalla lcd no importa donde la senal toque "A0, A1 o A2". Cualquier ayuda es bienvenida soy nuevo en esto.

Tambien se que despues del segundo if, va un else pero eso lo completo despues solo necesito luz para poder configurar varios value y solo se muestren cuando la senal lo diga.

Welcome. I understand your problem but I cannot properly answer it. I would suggest you spend some time learning some of the electronic and microcontroller basics. You are like in the middle of a forest with a saw wanting to build a house. There are many things you need before you can start. I would suggest you spend some time with some basic electronics tutorials to the point you understand what is happening. Also get a copy of the Arduino cookbook, either from your library or purchase it, it is a very good introduction to the Arduino. When you start with the Arduino cookbook do some of the examples, there is enough to keep you going for several months without a large investment. That will get you to the point where you can answer your question. You will have learned the color of the wire is not relevant that there are a lot of LCD displays, a Void loop returns nothing etc. Also have a spare Arduino, they have a habit of getting broken by mistakes made by the user. Yes even we old timers break them.

Hi thanks,
I already make a void loop with one 5v signal and is working with the lcd, I just want to know How I can build a multiple code with the analog in, bcs I know arduino dont let me put another void loop.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

Your code is missing a lcd.begin().
You can position your cursor on the LCD and print a message on a specific position.

Look at the examples for the LiquidCrystal library.