Vision sensor dosen't have functions from the documentation and exmaple

I’m trying to use the vision sensor with the python library, but in all the example code i saw they used functions (for example : set_brightness, etc) that i don’t have

where are you seeing these examples ? Are you sure they are not C++ examples ?


It sounds like you’re looking at example code for the optical sensor, not the vision sensor. Make sure you’re looking at the right sensor in addition to the right programming language.

nope it’s also in the docs, so I’m pretty sure its python

That’s the RobotMesh Python API, are you using RobotMesh or VEXcode ? If VEXcode, then it’s different.


I’m using vs code with the vex extention

there are only two methods, take_snapshot, which returns a tuple of vision objects, and largest_object.
see help and intelisense in the VScode extension for more details.

SIG_1 = Signature(1, 6035, 7111, 6572, -1345, -475, -910, 3.000, 0)
vision = Vision(Ports.PORT20, 50, SIG_1)

def visionTask():
    while True:
        objects = vision.take_snapshot(SIG_1)
        if objects is not None:
            for obj in objects:
                print(obj.centerX, obj.centerY)

Thread( visionTask )

Looks like the robotmesh docs have pretty good SEO, they’re the first result when googling, whereas the vex python docs aren’t even on the front page:

In fact, I’m having a hard time finding them at all. Could you link them?


and the point is ?
There’s no connection between the PROS C++ API and the VEXcode C++ API, why would you expect the, now obsolete and unsupported, RobotMesh Python API to be the same as the VEX Python API. We’ve said many times, the help docs are built into VEXcode and the VSCode extension, as well as many examples of their use.


Apologies, wasn’t trying to make any kind of point, nor was I trying to say that the RMS API should be applicable to the VEX python API. I was merely proving a possible explanation for why a student might end up looking at the RMS API docs instead of the official VEX ones, and was looking for where I could find the online documentation. From your response, I take it that there is no online documentation for the VEX Python API? I was unaware of this fact. It would be helpful to have some online docs so that it would be easier to assist students with programming questions rather than having to open up VEXCode on my computer.


If you look at the source code for any official V5 API page (for example,, you will see no search engine indexable content, just a few JavaScripts that, I guess, dynamically pull content from some sort of internal database:

I though it was automatically generated from the source code, but there are counterexamples:

Overall, compared to the excellent PROS online documentation, is missing meaningful descriptions, code examples, and hyperlinks:

The question is why couldn’t V5 online help be updated to have, at least, content similar to that already available inside the app?


How the page is rendered doesn’t really matter. Google, and likely other modern search crawlers, will run the page’s JavaScript during a crawl- since client-side rendered apps with no SEO are all too common these days.

My understanding is that the C++ docs are generated from source by parsing Doxygen XML output into JSON, then using something like react to render that page.

- m


This wont really help with SEO, but if anyone needs all the Python API docs as a single file, you could find them here: VEX v5 Python API Docs · GitHub

Hope this helps someone
- m


Thanks for doing this Mia.

The info at the link is the same help found in VEXcode, there are one or two classes referred to that do not apply to the V5 (specifically vr_thread) or the VS Code environment (calibrate_drivetrain() which is an auto generated function in VEXcode only).