Undocumented Vex Tech Scavenger Hunt

VEXcode console:

6 Likes

Gif class made by Jpearman as a demo that can show off “a couple of C API’s that we don’t usually expose that were added to vexos 1.0.5”:

in that topic he covers how to change the HEAP size:

factory calibration for IMU:

7 Likes

i advise people to be careful here…

7 Likes

V5 Brain Electronics

7 Likes

Optical sensor update rates:

4 Likes

5.5W Motors:

3 Likes

Vex Electronics Taken Apart:

4 Likes

controller::button::PRESSED:

4 Likes

how the GPS and gyro works

2 Likes

A few finds from messing around this season, including some random fun facts.

  • vex::vision::code is largely undocumented/unexplained. I believe these work similar to Pixy2 Vision Codes
  • Suprisingly, vex::pneumatics isn’t listed anywhere on VEX help resources (they recommend using digital_out instead). This offers an easier abstraction over digital_out.
  • vex::this_thread::sleep_for(); offers an alternative API to vex::task::sleep, which better matches the standard library implementation of threads.
  • Headers for libv5rt can be easily accessed via the vscode extension (since lv5rt.a is a static library). api.vexcode.cloud seems to be generated on these headers using doxygen (or something similar). These include the undocumented C API, but not the actual private API (v5_apiprivate.h is omitted from the actual production distribution of the V5 SDK).
  • The actual entrypoint for the V5 API is actually v5_cpp.h and not v5_vcs.h. v5_vcs.hseems to be included in vex.h as a relic of the older VEX coding studio program.
  • vex::competition::bStopAllTasksBetweenModes
  • For some reason vex::inertial::getTurnType is marked as protected, making it impossible to tell which direction the gyro of an inertial sensor reads as positive.
  • VEXCode Pro is written using nw.js and uses Monaco for its internal editor.
  • This is documented, but not well known. vex::triport::installed allows you to get the status and type of a triport device, similar to how smart port devices have an installed method.
  • vex::controller::axis::position returns integers from [-100, 100], while vex::controller::axis::value returns integers from [-127, 127]. This isn’t really listed anywhere, and could be a footgun if you use value instead of position.
8 Likes

teehee~

there is more fun to be had here

4 Likes

LVGL running on VEXcode; uses some undocumented v5 API calls for configuring the brain display properly.

1 Like

Vision sensor methods.

Also it’s probably important to mention the comment suggests that these could likely be removed or recieve breaking changes at any time, so probably don’t use these.

2 Likes

Details on controller position vs. value

detecting if motors are plugged into the brain

2 Likes

size of the vision sensor is scaled down from the camera

1 Like

GitHub repositories containing V5’s default “Drive” program. Useful as a reference for implementing joystick control, or for those programming clawbots, I guess.

2 Likes

updated part firmware for vexOS 1.1.2

1 Like

IQ gen2 battery percentage

python code is compiled on the brain

1 Like