Okay so basically I’m a little bit of a so called ‘noob’ when it comes to programming. I sound really dumb but how do I programme an encoder, the intent for said encoder is to count how many clicks a gear will take to shoot a ball when building up tension as the idea is to ‘slip’ and have another object shoot out to hit the ball but I have no idea how to programme this said encoder. Any advice?
for robotC, you can use
to get a value from the sensor.
The encoder counts in degrees, so you might need to figure out how many degrees it turns. Try untilEncoderCounts(degree amount, encoder name)
and put your code above it and then stop motor after the untilEncoderCounts. Try something like this -
Just substitute numbers and names in to that code, it should work.
@Kenzie Are you guys using V5?
it shouldn’t really matter, aside from that they could use the built in motor encoder instead