What are the I2C commands necessary to read the Vex Cortex Quadrature Encoders?

What are the I2C commands and data format necessary to read the Vex Cortex Quadrature Encoders? I would like to access them from a Vex 0.5 Microcontroller using the I2C Interface.

All sensors use the same format to read the sensor value, which is simply the command


SensorValue(leftDriveEncoder)

(assuming the encoder is for the left side of the drive). The encoders can read positive or negative values, and will keep counting up from their starting position, 0, infinitely. There are 360 “ticks” in a full revolution, so each tick is 1 degree.

When programming them, you can either reset the value by saying

SensorValue(leftDriveEncoder)
 = 0;

or you can use them to control something else:


if(SensorValue(leftDriveEncoder) < 500) 

.

Good luck!

Seeing as you run a site that (sells?) vex robots, I would highly discourage your use of the VEX microcontroller. You realize that you can get much better microcontrollers for a lot less money, that have tons of documentation on how to use encoders, servos, etc.?

VEX is meant for more educational use and generally speaking people only use it for the VEX Competition and simple applications as such. Examples of this are how modular parts are, in that they are meant for assembly and robot design through pure assembly.

See this.
https://vexforum.com/t/diy-vex-lcd-display/15080/1

and perhaps the code here.

Thank you jpearman!

That is the information I need.

Based on your note, I went to look at their page and they have some cool things (love the R2D2!).

There is a lot of documentation on the VEX controllers, lots on RobotC. And while you say there are cheaper / better, there are 0.5 processors out there for sale for about $25 which is a pretty good deal. As a Maker I’ve stuffed 0.5 controllers into things that are not part of the VEX competition.