I'm making the final adjustments to my code, but I need to confirm a few things before I try them out on the robot.
1) Does using the wait timer prevent all other robot functions from running in teleop until the wait timer is over? I'm talking about the wait timer used in
this code, but not in that context.
We have a drive shifter that switches between 2 speeds, and it shifts when the joystick trigger is pressed. The problem is that sometimes, our driver holds the shifter for half a second too long, and it shifts more than once. Can I put the wait timer in my code without it preventing tank drive and other robot features from functioning?
2) We are using a window motor for our arm, but due to gravity + inertia + physics, when we move the arm down, the arm just falls down all the way and smacks into the robot. I believe I have the window motor only moving at .4 speed downwards, but is there any way for to prevent it from falling down so rapidly? At the slightest touch of the joystick, the arm falls down all the way, and it takes a while for the window motor to bring the arm back up.
3) I need to code preset arm locations, that use the window motor and a potentiometer. I was looking at team358's
sample code to see how it could be done, and they used PID. Im not very experienced using PID, so I just need clarifications for this. Does the PID automatically know if it has a greater or lower voltage than the desired position, and move accordingly? And for the P part of the PID, does it matter how low the number I make it? Its supposed to lower the error on the motor as the number gets smaller, but is there a consequence to making the P number too small?
4) I don't remember the exact error I was getting, but when we run our code, Driver Station fills up with errors saying that Robot Drive either runs too fast or too slowly for teleop.vi / robot main.vi. When we run our code though, we experience no lag (besides the very occasional communication+robot code loss). If I need to, I'll post the exact error I get tomorrow, but I was just wondering is there a known fix to this? As far as I remember, we have been getting this error since day 1 with a clean FRC 2011 cRIO robot project.
If I remember any more adjustments I have to make and don't understand, I'll update this post.
Any help here would be greatly appreciated.