can’t figure out what we are missing.
if <button press>
SPIN FWD
this should make the motor continue to spin even when the button is released. but the motor stops as soon as the button is released and only spin when the button is pressed. is there a setting that we are missing?
thank you
So it appears the underlying program for this control would be like "WHILE (button = PRESSED) {SPIN FWD}; STOP;
If you want to customize your control to make it keep spinning after the button is released, you should do it in the program instead of the controller configuration. Something like:
thank you for a quick reply.
that’s actually what we are doing and it isn’t working. i can’t copy/paste the screenshot since the modkit is in a different system but the program is very simply.
code under a motor
[when start]
[loop forever]
[if <button A pressed>]
[spin forward]
[if <button B pressed>]
[stop]
very simple and straight forward code but can’t seem to get it working.
[when start]
[loop forever]
----[if button A pressed]
--------[spin forward]
----[if button B pressed]
--------[stop]
so the both if statements are inside the forever loop.
we have seen this as a sample code from video too. don’t understand why ours isn’t working properly. when button A is pressed and release, the motor should continue to spin until button B is pressed.
Here is the mistake we made (reference for others)
Do not assign controller button AND program button at same time. Controller routine (as saltshaker pointed out - thank you!) conflicts with any other button program.
So if button function isn’t working properly, check the Controller button assignment button and make sure they are clean.
I believe the spin should continue outside the loop. You can try removing the “stop” command in the last program (using “while”). Without the stop, it should continue spinning according to my past experience.