I’m troubleshooting a subsystem on my tam’s robot (An arm) before a competition tomorrow. We had to replace two motors, so I assumed that I might have to invert one or the other to make it work. However, when I have both moving so they don’t oppose each other, and in the right direction, the potentiometer reading changes to a negative. I’m working with CANTalons, Vex Pro motors, and unknown pots (I didn’t work on this robot last year and no one seems to know!).
you could try inverting the wires of one of the motors to skip the code all together. The problem with the pot could be as to how it is wired into the talon and such so I would try reversing that and worse comes to worse you put the pot in as a variable and then absolute value it so that it is positive
I thought that maybe the issue was that negative voltage was being run across the pot, and when I took the voltage between power and signal it was indeed negative. But when I rewired it so the power pin on the breakout board would wire into sense in the pot, and visa versa, nothing changed. I might try just reversing the polarity of the motors, but it’s kind of difficult without help. I’m the only one working on the robot, and I don’t know much about electrical. And I would just take it as a variable but I’m using the pot as a feedback sensor for MotionMagic. Is there a way to take the absolute value without needing to pass a variable?