Motor not running. LED solid red

When we initiate the robot, the pivot motor on our over the bumper intake is solid orange but when we press the button (goToGround()) that tries to run the motor it turns to solid red. According to our smart dashboard, it seems to show that the robot thinks its running but it does not move at all. We also can not feel the motor running physically. Our code is here. Here is a video of the smart dashboard.

Some additional hardware info: We are using falcon 500 with 80:1 max planetary gear ratio.

Also, after powering off the robot and powering it on, the angle it displays varys from 300 to 145. Im pretty sure its supposed to be 0 but im not sure why. Also the values only update after enabling. I can not seem to figure out how to have it update when the robot is on and disabled. We were able to do this last year with TalonFX#getSelectedSensorPosition() but its deprecated.

Thanks!

We had a swerve motor (neo 550) that behaved similarly. It turned out that the crimps were not properly inserted into the anderson connector. You can test this by pulling (not too hard) on the wires going into the connector for the motor controller to make sure that all the connections are okay. It may not be the issue, but always worth checking.

Ok, I will look into that once I get access to the robot. Although I think its most likely a code error.

We checked the electrical wires and it does not seem to be the problem. We rewrote the code and we think that we are calling the pivot incorrectly. We are still having the same problem. Can someone please take a look? Thanks!

Its been several days but we are still having the same problem and have no idea why. The indexer works but the pivot does not. Can someone please take a look at the code?

Need more info for a definitive answer, what is the output to SmartDashboard? does the target angle match what it should be? If not, then I’d suspect an issue with your states. Is the pivot power high enough that it should be running the motor? If it isn’t then I’d try a higher P gain.

One thing you could try is resetting the TalonFX config to the factory default in Phoenix Tuner to make sure there aren’t any problematic settings stored on the motor.

The output should be the position of the arm. We tried using the same code on a different motor that does not have any gearboxes or anything and it also did not work. The motor just does not move at all or attempt. We tried increasing pid and power but nothing happened. We think its a code error.

We have been stuck on this problem for almost a week now and still have no idea why. But also we only have 2 programmers and this is our first year programming. We also do not have any mentors with knowledge of code. So the issue might be something simple, we just can not seem to find it.

hey!

we actually have a very similar mechanism called pivot. i looked at your code and noticed a few things:
on line 169 in intakeSubsys.java, you wrote
double value = pivotMotor.getPosition().getValue();
in phoinex 6, getRotorPosition is used instead, so it would be
double value = pivotMotor.getRotorPosition().getValue();

on line 163 in the same file, you put
pivotMotor.setVoltage(intakePivotVoltage);
which i dont think runs the motor. what we do is
pivotMotor.setControl(new DutyCycleOut(speed));

also, you noticed the color was orange, which means that the robot is disabled if you check page 41.

Hi, thanks for the reply. I think you are looking at the old code. The new one is in the most recent post I made

Its been 12 days and our code intake code is still not working. When we try to run the intake this is what happens: here. We tried changing PID values, We changed the p value from 0.01 to 0.1 to 1 to 10 to 80 and noticed no difference. we changed the v value from 0.01 to 0.1 and noticed no difference. We tried changing acceleration and velocity and saw no difference. When we put it at 0 there was no change as well. The motor just kept making the buzzing sound. Can someone please take a look at my code and help us? Is there maybe something we have to set the motor to in tunerx? Our code is here. This is my first year programming and im the sole programmer with no programming mentor so this has been extremely difficult. I was originally a mechanical member but due to having no programmers was forced to step into this role. We have already been stuck on this for way too long and would appreciate any help. Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.