|
Re: Only One side of the "mock elevator" is working
I'm trying to figure out what you're doing here.
Do you have two separate sides of the elevator which run in opposite directions to lift, controlled by jaguars? If so, it would probably make more sense to have the Elevator2 "constant" equal -1, then when you set the speeds, the code inside the loop is either both positive or both negative.
Also, what is the function of the relays in your setup? Should you set them to some value when stopped?
Finally, just to verify that you are only declaring/assigning objects to E1 and E2 once in initialization, not once per loop? Re-declaring controller and sensor objects repeatedly can cause them to work inconsistently as they cycle through shutdown and startup. Re-declaring the floats would be a waste of CPU cycles, but is less likely to be noticeable in terms of performance.
Oh, also to verify -- java, right?
__________________
If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Last edited by GeeTwo : 30-03-2015 at 10:22.
|