We have an issue with our intake code. For some reason, when the intake code to run the intakes slowly back (buttons R2 and B) if we have just ran the intakes quickly (button L1 and L2) the intakes will jolt for a split second at that speed.
For example, if we just pressed L1 and ran the intakes full speed inward, and then press R2 to run them out slowly, they will jolt at 100 percent inward for a split second, then rotate out slowly like they are supposed to.
As a result, we have dropped a lot of stacks in practice. Any ideas?
I had the same problem with it earlier in the season, but sadly none of my programs to work. I will see if I can figure something out
Maybe you could try putting in wait codes in between? (vexcode isnt pulling up for me right now)
I suppose the issue is that i’m setting the velocity then spinning instead of using just .spin. I’ll try it out tonight.
@Capten, please, wrap your code into
[code] ... [/code] tags. It will be much easier to read.
@Robo_Chicken in your original post you didn’t include the else statement that stops your intake motor.
How do you stop it?
Do you use .stop() function or set velocity to 0?
Can you try both ways and let us know if it helps?
Right now we are using .stop()
I will try it your way when I get the chance (probably tomorrow)
See the thing is now that you pointed it out, I too have noticed this subtle yet consistent problem with out bot too. If anyone knows how to fix it, could they help? My code specifically just holds if not moved.
I believe it’s just a quirk with the hold function. All of our motors do the same thing when they go from holding to moving.
will do, i forgot and was using <(code> and </code)> by accident (ignore paranthesis)
So we ended up changing the stop mode to (brake) instead of (hold) like we had been doing, and that solved the issue. Thank you to all who helped us out.
the issue is you have two intake stop functions at two different flows. when ButtonL1/2 is pressed the intake motor spins, then because the ButtonR1/2 is not pressed, the intake motor stops. The cycle goes on and on and the intake jolts.