Re: loading files into first tech challenge virtual world
Ok, so I dug a little bit more into this and there is encoder support for the FTC Ring It Up! table on motors D and E (drive motors). There are no wrist/gripper encoders available at the time of this release.
The following code to move forward for 500 encoder counts will work because the encoders on motors D and E are active:
However, the code to rotate the wrist back and forth won't:
What will happen is the wrist 'encoder' (that doesn't exist in RVW, yet) returns a value of 0 no matter where the wrist is at. Since the while loop is looking for a greater than 250, and 0 will never be greater than 250, the wrist will rotate upwards until it physically hits a restraint. It's hard to see, but the program actually keeps running inside of the first 'while' loop because it's going to keep trying to hit the 250 encoder counts mark, which it never will.
Check out our Blog
! And our Facebook page
Need help? Take a look at our updated help documentation
and the ROBOTC Forums.