I’ve got the positive lead from the motor going into M2 Out B, and the negative lead to M2 Out A. I’m using an eight AA pack with new batteries, but the motor barely runs, and within about 15 seconds stops entirely.
The solder connections look ok, no shorts or anything, and I don’t think I missed anything in the manual (although if I did I wouldn’t know it . Here’s the code I’m running.
int abCounts = svp_get_counts_ab();
int cdCounts = svp_get_counts_cd();
int abErrs = svp_check_error_ab();
int cdErrs = svp_check_error_cd();
printf("AB = %d CD = %d", abCounts, cdCounts);
printf("abErrs = %d cdErrs = %d", abErrs, cdErrs);
Have you read Read Before You Post: General Advice for Getting Help, which is the post that sticks at the top of this forum? I’m asking because you could have simplified your code a lot more by taking out all the 11 lines relating to the LCD and the encoders (or if your motor problems are caused by those lines, then you can’t take them out but it would be important information to report).
Your current code is trying to run the motors at less than half speed. You should try running them at full speed, using this code:
You should also try connecting the leads of your battery pack directly to the leads of the motor; this should produce the same result on your motor as running the code above.
Let us know the results of those two experiments.
Also, what kind of motor do you have? How much current do you expect it to draw?
I’m not sure what happened, but I got home from work, and tried the things you say, and it’s working at 100, 200 and 255. Nothing changed, the stuff’s been sitting here on my desk all night. I did pull the wires to connect them to the battery directly, maybe I just didn’t have them seated correctly before or something. Would that have made the motors just barely go, and then stop?
Well, all’s well that ends well I guess. Sorry for the bother.