When I try using the command spinFor(36,turns); where 36 can be any number, it acts like there is a “false” parameter added, that is, even if it is 10,000 turns, the motor only moves briefly then moves onto the next command. Instructions say this command should be blocking unless a false parameter is added. I can get spinFor(3, seconds) to work as a blocking command. How to get “turns” to be blocking? I tried adding “true” where “false” would go, but that made no difference.
I just checked, seems to be blocking ok.
in my test, the motor was created as
vex::motor m1(PORT19, gearSetting::ratio6_1 );
then in code
m1.spinFor( 2, turns ); printf("done\n");
did you mess with setTimeout or anything like that ?
setTimeout was the problem. thanks!