Gyro sensor for VEX

I am an FRC team founder working with some college students to compete in the VEX College Challenge coming up at the end of this month. Robots are coming together and they are starting to focus on autonomous functionality.

I don’t see a gyro sensor on the VEXRobotics website and I am wondering if anybody has used a third party sensor with VEX in the past. I am going to have look over the robot rules to ensure that such third party electronics are allowed so go easy on the flames if this post is moot due to rules violations. I’d still be interested in finding out if gyro chips have been used with the VEX system.



Find out about the rules. If they allow it, I have some good news for you, I have had a FRC KOP Gyro and a 300 deg/sec Gyro from Sparkfun on my Vex. It was actually used to prototype and troubleshoot our navigation code in 2008.
I got the code for using a gyro by taking Kevin Watson’s Gyro code and modifying it into the Vex software architecture. It’s quite simple to do, it just takes a little reading of his “readme” files and his .h and .c files and understanding what he was doing.

In fact, I might still have the file somewhere on an old laptop. I would be more than willing to share it with you if you need it. Just send me a PM and I’ll get you hooked up.

Looks like we are good to go if we want to add a non-VEX sensor per the college challenge appendix F.

[LEFT]7. There is NO restriction on sensors and additional electronics used for sensing and processing
except as follows:
a. Sensors & Electronics MUST be connected to the VEX Microcontroller via Analog/Digital
Port or Interrupt Port. They cannot directly interface with the VEX Motors.
b. The additional Sensors & Electronics can only receive power from any of the following:
i. Directly from the VEX Microcontroller via Analog/Digital Port or Interrupt Port.
ii. From an additional VEX 7.2V Robot Battery or from a VEX 9.6V Transmitter[/LEFT]
Battery (only one (1) additional battery can be used for sensor power.)

We’ve used sparkfun gyros successfully too. Both 150 & 300 degree/sec varieties. WPI.lib had support for gyros and accelerometers which we used in with our Vex robots.

We’re using one of the new Vex accelerometers on our FRC robot this year, too.

hi all im eric a student from Singapore. Im new in VEX and i really need help. My project is to build and program a fast line following robot. But with all i have in the starter kit i can only manage to make one that is moving in a moderate speed. My lecturer suggest that i implement gyro sensor into my robot but im a noob in gyroscope. i don’t know how to implement it especially with the coding and the placement of the sensor… Which port suit the sensor best? I need urgent help. Help me please…

Here are some resources for you: (official vex forum… talks about every vex related stuff)

This is a very through article explaining beginning (1 light sensor) PID control for line following.

After you got that down, implement more light sensors to make it faster / accurate.

As for the gyro sensor, I’m pretty sure it should be put in an analog port, but I am not quiet sure how it can help with line following. I only use line sensors and they do a very good job following the line with PID.

Hope this helps.

ya im now turning to PID instead…thanks for sharing but quite difficult to understand … do you know if i can program it using easyc?? if yes? How do i program that? You got a standard PID code for vex?? i need it so much for my line follower robot…

Here’s a link to the Vex Gyro:

This is a duplicate of my reply in another thread:

You can implement just about any sort of feedback loop in EasyC (PID is not the only form of feedback-loop control algorithm).

As the algorithm gets more complex, you will want to switch to EasyC Pro because the icons and flowcharts of ordinary EasyC become to bulky and hard to read/maintain.

Up until you stumble over some way to confuse the EasyC compiler. the only limits are the speed of the computer you are using, and its storage capacity. You are far more likely to have trouble with either of those before EasyC will fail you.

Go to the web pages and do a search there. There are discussions and sample code for implementing feedback loops to follow lines.