Hey, thanks for the reply Ro-Bot-X. I will try this out as soon as I can and report my findings. I just wanna ask something about this program though. Say I need to turn on/off an LED, would it go something like this:
#define LedA 1 //just adding these 2 as an example
#define LedB 2
void loop(){
DoProxy();
//do something with the value returned...
if (Obstacle == 1) // this would be what is done with said DoProxy value.
{
digitalWrite (LedA, HIGH);
}
if (Obstacle == 2)
{
digitalWrite (LedB, HIGH);
}
if (Obstacle ==3)
{
digitalWrite (LedA,HIGH);
digitalWrite (LedB, HIGH);
}
else
{
digitalWrite (LedA, LOW);
digitalWrite (LedB, LOW);
}
}
It will be a few days before I get a chance to check this out so just seeing if I understand this correctly.