modkit spin forward

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:

c20895f1f0ae28d1921e221f004c37f4.JPG

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.

I think the program will stuck at spinning forward won’t respond to the button B, right?

I would try something like this:

c8503c8e1249f99f709e187d89b41539.JPG

editor messed up the indentation.

[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.

How about

6d5b665bd43658ad54e033b819d8e908.JPG

cool! that would be a good work around. I will test it out and report back.

in the meantime, i want to verify that [spin forward] should continue to spin the motor outside of the loop until [stop] is ran.

Got it! it is working now.

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.

Thank again saltshaker for your help!

Aha. that makes sense.

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.