hmmm....i don't quite understand this part
Code:
sensorReading = PORTJ>>4; // Combined digital inputs 15-18
if (latch == 1)
{
if (sensorReading == 0)
{
latch = 0; // Take only the 1st reading to avoid being caught by a half & half state of the IR sensor
}
}
else if (sensorReading != 0)
{
latch = 1;
if (sensorReading == 8) IR_cmd = 1;
else if (sensorReading == 4) IR_cmd = 4;
else if (sensorReading == 2) IR_cmd = 2;
else if (sensorReading == 1) IR_cmd = 3;
printf("IR_cmd = %d\r\n", IR_cmd);
}
what exactly does this do? especially the first part.
__________________
That's a PEBKAC problem. (Problem Exists Between Keyboard And Chair)
^Yea, I never run into those...