Programming Using LM324 Comparator Signals on ANALOG PINS ( LFR)

I`Ve simply connected an LFr sensor using comparators to analog pins of Arduino UNO,, My querry is that the outputs of comparators of all sensors are high but the arduino is perhaps not recognizing it , and the LED is not Blinking,...

:roll_eyes: :roll_eyes: I am very new to the Programming if i have any Error in it please Guide me , Thanks :slight_smile: :slight_smile:

int LED=13;
int sensorL1=A5;
int sensorL2=A4;
int sensorL3=A3;
int sensorR1=A2;
int sensorR2=A1;
int sensorR3=A0;
void setup() {

pinMode(13,OUTPUT);

void loop() {

analogRead(sensorL1);
analogRead(sensorL2);
analogRead(sensorL3);
analogRead(sensorR1);
analogRead(sensorR2);
analogRead(sensorR3);
if((sensorL1==HIGH)&&(sensorL2==HIGH)&&(sensorL3==HIGH)&&(sensorR1==HIGH)&&(sensorR2==HIGH)&&(sensorR2==HIGH))
{
digitalWrite(LED,HIGH);
delay(1000);
digitalWrite(LED,LOW);
delay(1000);
}
}

analogRead(sensorL1);
analogRead(sensorL2);
analogRead(sensorL3);
analogRead(sensorR1);
analogRead(sensorR2);
analogRead(sensorR3);

Read some data from the pins, and throw it away. Well, it's your data and your Arduino, but that doesn't seem reasonable to me.

if((sensorL1==HIGH)&&(sensorL2==HIGH)&&(sensorL3==HIGH)&&(sensorR1==HIGH)&&(sensorR2==HIGH)&&(sensorR2==HIGH))

It is not likely that A5 (19) will equal HIGH (1), or that A4, A3, A2, A1, or A0 (18, 17, 16, 15, 14) will, either.

The output of a comparator is digital. Why then are you reading it as an analog value?

Hi,
Welcome to the forums.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom..... :slight_smile: