danaxye.blogg.se

Robotc programming guide vex
Robotc programming guide vex















You had to drive all the way down the side of the field (through a forest of cones) to reach a mobile goal putting a cone on the stationary tower was not very far away, but required a lot of precision to hit a small target.

#Robotc programming guide vex free#

Alternately, a mismatch could be caused by one side of your chassis encountering more friction than the other-maybe the spacers on the shafts of one side don’t have *quite* enough free play to allow the wheels to spin optimally.Īt the start of In The Zone season, our robots just used basic turn-motor-on/turn-motor-off coding in autonomous driving, and we had a really low success rate, because ITZ in particular required a lot of precision to score anything. If you’ve got motors on the left & right sides of your chassis that are not perfectly matched, your robot will drift over to one side. sometimes they end up being quite a lot different. Once they get a little wear & tear on them. VEX motors (V4 393-motors, as of this writing) are all a little different from each other, even right out of the box. I mention “PID-speak” a few times in this post, but generally avoid these technical terms, because phrases like “set point” and “process variable” don’t carry inherent meaning in my brain I find it easier to talk instead about a “target” and a “sensor value”. Why? Because using PID coding is the way your team is going to win the autonomous bonus. Once your team gets their feet wet in programming, understanding PID should be pretty high on your to-do list. On a drive train, you’d use shaft encoders for a lifting arm, you’d probably use a potentiometer for turning, a gyro, etc. If you don’t have any sensors, you won’t be using PID: the algorithm needs to measure something that’s happening in real-time on the robot, and to measure stuff, you need sensors. It does this process over and over and over in a while loop. PID algorithms are used in combination with sensors: the algorithm checks the value of a given sensor (the “process variable” in PID-speak) and compares it to a pre-determined target (called the “set-point” in PID-speak), and changes the motor power based on those sensor readings. The acronym PID stands for “Proportional, Integral, Derivative” (more detail below), and it’s a computer coding algorithm that makes small adjustments to motor power in order to achieve more precise and smooth robot movement. This is another one of my long posts, so here’s your handy-dandy Table O’Contents. I’ve been dancing around writing a post on PID controllers for quite some time, and now it’s finally here! If you’re new to robotics, you may have heard people talking about PID and not known exactly what they were referring to, but if you’re anything like me at that stage, it all sounded pretty complicated.















Robotc programming guide vex