Vex IQ: Flywheel R-Up (spin) and R-Down (stop) issue on button release

Our programmer had an odd issue with R-up and R-down buttons, but the same code works fine on joystick (R-3, L-3) buttons on a flywheel design. Press R-Up (or R-3) spin shooter. Press R-Down (or L-3) stop shooter. Simple code. He has also done the toggle variable route same issue. When we use R-Up and R-down; the R-up release of button stops the shooter motor (and should not). Even when there is no R-up release code. Odd thing: change to R-3 (joystick) to start and L-3 (joystick) to stop and it works as expected (stays spinning). However, R-up and R-down still work - with no R-up or R-down code in block, C++ or python view)??? Even though no code for R-up and R-down anywhere. Tried a new slot and still the same. Tried variable with if condition same behavior. His brother’s simple program works on R-up (start spinning) and R-down (stop spinning) as expected (same brain and controller). The drive program is not large - I can upload if needed. I don’t believe a hardware issue as the simple program on same brain and controller works as expected. Our team is having issues holding the shooter button down; and would like to stay with R-up (start spinning) and R-down (stop) - or variable on R-up start stop is fine (if bar true stop spinning turn light red; else start spinning turn light green). State meet is 2 weeks out and changing buttons for the shooter not an option. Thoughts? Works great on R-3/L-3; change buttons to R-up/R-down motor stops spinning on release of button. One difference from simple program that works is set velocity and set torque on when started. Thoughts?

but that’s what your code shows.
assume “Flywheelspin” is false, RUp pressed will spin the “shooter” in reverse and set Flywheelspin true. Then when RUp is released it will stop the “shooter” as Flywheelspin is now true.


Current he takes out the release buttons and it still stops. If he only changes button to R-3 works great (keeps spinning). If he puts it back to R-up the moment he releases button coast to stop.

Currrnt code with variable; even simple R-up press spin, R-down stop — shooter stops when he releases R-up. Changes to R-3 works. Tried R-3 with no R-up/R-down code anywhere and Those buttons still work (???). Looked at source in blocks, python and C++!could not find R-up / R-down code anywhere but still spun shooter. I can upload code if you want and thank you (again) for helping (last time you found sound corrupted the gyro).

perhaps that motor is also assigned to RUp/Rdown in graphical configuration.
send me a program I can run (not just screen shots) and I will take a look.


Thanks sent program. Even simple R-up pressed spin shooter (no release code), shooter stops when release button; flip code to R-3 (only change) works fine… notice in version uploaded release buttons removed blocks. If you change to R-3 and L-3, R-down and R-up still work.

ok, got it, I’ll run it tomorrow but I suspect this is the issue.

There’s going to be a conflict between the auto generated code for the shooter on RUp/RDown button in the graphical configuration and the event based code you are adding.


Thank you James! Let me know what you find.

James - THANK YOU! Never knew controller auto assigned them (we didn’t). He unchecked and works great! Removed all but joystick on controller it WORKS! Mark as done.