What is an encoder, and what can you do with it? Examples are welcome.
The quadrature encoders basically can be programmed to measure how fast and a drive shaft moves, as well as how many times it spins, up to I believe 360 degrees. This can be used to program the robot to move to drive to an exact position. They can also be attached to the lift or intake of a robot to get exact measurements for those too.
Personally I would definitely use these on the robot, especially the drive, for autonomous. The annoying thing is it seems we can’t use both time based values in our program and sensors at the same time, so unless we have sensors on every part of the robot, we can’t actually use the encoders.
Also, don’t mistake the encoders for potentiometers. The potentiometers are much smaller, but can only be moved about 270º.
Um what? There is no inherent reason why this would be true. If you have this problem its your own code limiting you
Well, while it’s true that an encoder can give you readings over the full range of 360 degrees, do not forget that the encoder can turn around and around an “infinite” number of times in either direction. That makes encoders great for putting on things like wheels that drive the robot around the field, wheels which rotate multiple times. By contrast, a potentiometer (pot) can give readings for only 260 degrees and therefore cannot rotate multiple times.
You can use sensors as well as timers by using the AND feature of whatever program language you might be using. In fact, some teams will have a WHILE statement watching a sensor reading but include a “watchdog timer” to break out of the WHILE loop in the event the sensor fails.
If you’re dying to see what’s inside of an encoder, have a look at these:
Are there any other types of sensors?
Go On The VEX website and look at the section called “Sensors”
I just asked our programmer and it turns out we can do it, oops! I guess I had some misconception about our program
What I meant by 360 degrees was the precision of the encoders. Because they have 2 wires and not just one, the 90 tick marks can have 4 positions each to get up to 360 degrees in one turn, so programmers can move the shaft to the exact degree. With just one light beam you can only move the shaft to every 4 degrees.
The VEX product page has a bunch of sensors.
There are a multitude of sensors that vex sells on their store, which can be found under the sensor category.
EDIT: took too long, harrio34 an Victory5776 both beat me to answering the question.
This only applies to the Quad Encoders which are controlled by the Digital Ports, I however, prefer IME’s due to their smaller form factor, They also run on I2C which can be daisychained.
Have a look at this page: