I am trying to make a If command that will detect produce True if the object is in screen
How to code if a object is in screen using vision sensor on Pros Visual Studio Codes?
Reading the documentation will help Vision Sensor C++ API — PROS for V5 3.8.0 documentation. In summary, you will need to use the vision utility to set a signature to look for, and then get objects of that signature. If you don’t get any objects, there must not be one.
thanks for the info appreicate it?
I looked through it but when I inset the commands it doesn’t work. Also what is the command that insets the x position or the y position because in the documentary it doesn’t really explain and it instead it says to “set the position” and does it manually.
It would be helpful to us if you could post screenshots of the code that you tried and whatever error messages you got.
I’m not really sure what you mean by “insert the x position or the y position”. If you are talking about setting the origin point of the sensor’s coordinate system, check out the constructor Vision Sensor C++ API — PROS for V5 3.8.0 documentation
If you are talking about getting the coordinates of a detected object, that is in the object structure Vision Sensor C++ API — PROS for V5 3.8.0 documentation
Oops I accidently sent this in the wrong place. I didn’t mean to put this in the vision sensor section. Also I was talking about the GPS sensor and that is what I meant by the x and y cord.