|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Negatives not working.
In our robot code, we are attempting to program a motor to go forward for .5 seconds, and then go backwards for another .5 seconds at the press of a button, but for some reason, negative numbers are not working. The motor goes forward for .5 seconds, and goes forward again instead of backwards.
For the motor speed we have -0.5 entered in. We tried controlling the motor to go backwards and forward using the throttle axis on the joystick it worked fine. Thanks for any help! |
|
#2
|
|||
|
|||
|
Re: Negatives not working.
can you post your code?
|
|
#3
|
|||||
|
|||||
|
Re: Negatives not working.
-0.5 is usually forwards. That's what your throttle sends.
It's probably the positive speed value that's causing you trouble. |
|
#4
|
|||
|
|||
|
Re: Negatives not working.
What can I do to fix that?
We just tried having one value 0.5 and another value of 0.5 connected to a negate function, then connected to the motor speed control. Again, no luck. Thanks for all help you can give. |
|
#5
|
||||
|
||||
|
Re: Negatives not working.
one of your motors could be wired backwards, in this case, just go to Begin and click true for isInverted(), of course, that is if this motor is an issue for all your states.
|
|
#6
|
|||
|
|||
|
Re: Negatives not working.
Quote:
Try just wiring a constant -0.5 to the motor, it worked fine for us. EDIT: eh, reading your first post again, it looks like that's the first thing you tried ![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Jaguars not working | mama_tree | Electrical | 8 | 01-02-2010 07:54 |
| p2 not working? | Lone_Wolf92c | Programming | 5 | 22-02-2008 08:49 |
| IR Board Not Working (But NOT Fried) | itsme | Electrical | 2 | 18-02-2008 06:11 |
| Gyro not working | 1594code | Programming | 2 | 12-02-2008 18:16 |
| Negatives in Binary | Michael Hill | Math and Science | 12 | 10-02-2007 21:28 |