Hi,
Scott here from Salem. I am using an Arduino r3. I am using 4 photoresistors as sensors. When they are all below 300, then I power the pololu motor driver.
The following code works well when all 4 sensors are below 300:
while(leftValue < 300)
{
while(rightValue <300)
{
while(upValue < 300)
{
while(downValue < 300)
{
However this code causes the while statement to pop out when only 2 of the sensors are below 300:
while(leftValue && rightValue && upValue && downValue < 300)
am I doing something wrong. It seems the arduino cannot read multiple conditions in a while statement?
Thanks for your help.
Scott