@jpearman
We added RobotC code for a potentiometer on our chainbar with preset buttons based off code that jpearman had posted online with modifications to work with our robot (added another preset, set it to hold going both forward and backward by checking where the pot was set, adjusting motors).
On Sunday after editing the code, everything worked great for a short period and then we started having multiple issues. We aren’t sure if this is code related or motors / wiring related, so while we work on other fixes we’re hoping someone can take a look at the code and make sure we integrated it with our current drive program correctly. We haven’t worked with multiple tasks before, and this is more complicated code than we have been using up to now (although we walked through it all very carefully and are pretty sure we followed along).
-
Original main issue: when using preset buttons, the mobile goal carrier seems to start moving in and out a little bit and then stall (all on its own with no buttons pressed).
– Does this have something to do with the presets being blocking code? Isn’t having it in a separate task supposed to let other things operate fairly normally? -
New main issue: many of the motor controllers are suddenly shorting out between Sunday and Wednesday. Since the original problem Sunday, we had 3 different motors stop working correctly and we determined it was likely motor controller issues; the 2 we had available to replace them with also didn’t work.
– Motors will start only going one direction
– Motors will start being very slow / weak
– Motors will stop working altogether
– Some Motor Controllers will start getting very hot to the touch (much hotter than other MC running)
We’re running RobotC 4.56. We have competed since October with this robot (although we started with the base and then added the lift portion in December) and have made changes but nothing that we think would cause these sudden issues. We have 12 motors and a power expander.
While talking with tech support about motor controllers we were told that they don’t usually go bad or get very hot, and that if they do it is likely a faulty wiring issue causing a short. They also seemed to be saying bad motor controllers usually melt the plastic and can be seen from the outside, though, and we tested 17 motor controllers today that all looked fine (although 2 were tested after repairs) and only 8 worked correctly. Anyhow, we:
- Removed all wires and motor controllers from the robot
- Tested and checked all wires (seemed fine), tested all motor controllers (only 8 worked), tested all motors on the robot (all but 2 worked as expected; 1 of those was running slow and was a drive motor so we replaced it - the other 1 worked well only when the wire was pointing up so we zip tied it into place)
- Added back all base motor wiring (drivetrain, mobile goal lift/grab); the base seems to be working now (limited tests due to time that it took to do all the work!), but that is without any of the top elements attached.
Tomorrow we’ll begin re-wiring the top section, but we’re concerned that if faulty code could have caused some problems if we don’t get that fixed we may just end up having issues again. The timing was suspicious, as code was pretty much the only thing we were really working on recently. Code posted next.