My team is currently trying to make code for our vision sensor. I did many different attempts at this and thought the code below would help with knowing if the sensor is actual detecting stuff or not(Especially with the else statement) Here is my code:
if(Vision.takeSnapshot(Vision__SIG_1) > 0){
Brain.Screen.print(“Test is good”);
}
else{
Brain.Screen.print(“Test failed”);
}
Note: Before anyone says the if statement is wrong, I checked a class reference and the takeSnapshot function return the number of objects detected with the color sig