We’ll be using a modified claw to grab a mobile goal by the vertical stem. What’s the most efficient way (in block-based Vexcode) to stop the claw motor as soon as it’s got a good grip on the stem? Do we check if
What we ended up doing is let the motor spin for 0.5s, keep spinning and at the same time wait until the velocity drops to < 10%, and then stop the motor (hold). That sort of works, but what happens is the plastic pipe tends to slide out of the claw (even though the claw is padded on the inside with, I think, tire tracks?). I’m wondering if it’s okay to keep applying a small velocity (<5%?) once the claw has closed? Or will that put an excessive strain on the motor?
int nWritten = Brain.SDcard.savefile( “test.h”, (uint8_t *)arrayofvalues, sizeof(arrayofvalues) );
You have to store all of your values in a 2D array or a vector, so that way you can have everything in one file.
Apparently you can only save data types of uint8_t (unless I’m wrong, I hope I’m wrong because it’s causing me problems), so anything that involves anything above 256 or lower than 0 you’re gonna have to do some math to fit it in there. Plus you can’t use floats, so you gotta figure that out.
I don’t believe you can. If you’re trying to do these things you should honestly switch to vexcode pro. But if you insist, you can just print the variable values to the screen (preferably the computer, if they have an std::cout function). Then you can write it down on an excel spreadsheet. This is ofc if you’re trying to save the averages over time. if you only need it in a match, like being the decider for an if statement, just use variables, no need to save the information. You can combine the two btw