Get the syntax correct as a starting point:
if (volts>150){ condition = 1;}
if (linesensor_left < kWhiteThreshold){condition = 2;}
switch (condition){
case 1:
// code
break;
case 2:
// code
break;
}
Get the syntax correct as a starting point:
if (volts>150){ condition = 1;}
if (linesensor_left < kWhiteThreshold){condition = 2;}
switch (condition){
case 1:
// code
break;
case 2:
// code
break;
}