Controller gyro?


I was working on my teams programming, and I noticed that the VexNet controllers have a built in gyro or accelerometer. I was wondering if anyone had a drive control for that that I can use.

I tried the example code, and only forwards and backwards work. The turning is backwards.

Anyone ever try it yet?

I just tried the Accelerometer Control demo, it seems to work although motors speeds are slow. The code changes the turning direction depending on whether you are going forwards or backwards, not sure I would do it that way, but it’s only an example and should be treated as such. The key thing to know is that you read the values of the x and y accelerometers using the vexRT] array as;

accel_x = vexRT[AccelX];    // update 'accel_x' to new current reading
accel_y = vexRT[AccelY];    // update 'accel_y' to new current reading

how you use these after that is up to you.