Im working on a robot that i added a 2 IR sensor that put out a HIGH when there is no floor and a LOW when there is a floor. now i been trying to work out a way to write this code so that when one of the sensor go HIGH
i want to send out a halt to stop the robot from falling over the edge.
int Floorsen_a = 12;
int Floorsen_b = 13;void setup()
{
pinMode(Floorsen_a, INPUT);
pinMode(Floorsen_b, INPUT);
}void loop ()
// rember that floor is safe when input = low
{
int right = digitalRead(Floorsen_a);
int left = digitalRead(Floorsen_b);
int Floor_Safe = right + left;
Floor_Safe != 1
}
But that as far as i can get. right now im working this as if it is on its own but in the end out come it will be ruining as a function
any help would be great or idea. thank you.