We recently switched our code from RobotC to PROS, but some of our motors are not working. One side of our drive train works with the left joystick but the other side does not work with anything. We have switched these motors to the other joystick, which worked, but the other side still does not.
Post your code so the community can better help you.
Actually, we have been having similar problems. I feel that it might be because we are drawing too much power from the circuits in the cortex, @Tesla_321 look into a power expander, and we might do the same
The PTCs don’t trip any differently with PROS as compared to with RobotC.
@Barin Obviously. But we’ve been noticing these types of motor failures all season, and have made this conclusion. Mr. @Tesla_321 associated the motor failures with PROS, but that may not be the case
This is the code
Competition.rar (1.06 MB)
So what exactly is going wrong. Do the motors not work at all or do they work for a while and then stop working. It seems like you all are giving conflicting information here
I got it all working now. I just need to figure out a way to print out the potentiometer values to either the LCD or computer. The problem was two motor controllers not plugged in right.
@Highwayman We actually just got home from a competition today where we found out the issue. We have (had) a clip which connected our battery to our cortex. Great and all, but the connector was faulty and caused us to randomly lose power. After fixing this, we did not run into any other connection or motor troubles
Do you know how to do the debugging in PROS?
to print to computer, I would have to check to find the print to LCD function. Look in API.h
If you need more help just ask
what do i write exactly. the potentiometer’s name is rLift
Assuming, by potentiometer’s name, you mean you have
#define rLift <port>
in your code:
will return the potentiometer reading
will output the potentiometer reading with a new line character (so 1 reading per line) to the computer debug terminal
So I would put in
where exactly in the code? Like in usercontrol.c?
That depends on what exactly you’re wanting. If you want the readings to continuously output during driver control, put it in the infinite loop in
I got it working.
Please mark this thread as answered.
Ok, I’m not the owner of the thread but I’ll tell him to do it. Also, now when I try to download new code to the robot it says asking for system information and fails. Would this be because it keeps uploading the potentiometer value to the computer and isn’t responding to getting the system information?
That’s actually a pretty common thing that happens; most of the time there isn’t actually anything wrong. Just hit the Download button again; sometimes you’ll have to repeat this process a few times to successfully download.