Hi there,
We have recently changed some green motors and replaced them with red motors. However, our robot brain is failing to recognise that these are red motors meaning the strength of our wheel movement has not changed. The brain fails to recognise the change when plugged into an autonomous competition switch. We do not know how to make the brain recognise the red motors.
Any ideas?
Many thanks,
Team Geems
The cartridges do not communicate with the brain. You need to define what gear ratio is in the motor when you declare the motor in code.
If you are using VexCode Pro or text it would be the 2nd parameter (ratio…)
motor RightDriveSmart = motor(PORT10, ratio18_1, true);
If you are using the VexCode devices tab there are buttons to select the gear ratio.
6 Likes
Thanks for this - really appreciate the quick response. We have checked the code and we definitely have red motor selected for the motor group (on 36:1 ratio). However, when we run the autonomous programme the brain disregards the code and seems the brain resets back to green without instruction.
Any other ideas??
Can you provide more specifics? Can you post your code?
Is this for your chassis? Is the brain driving different distances then you defined in your code?
Do you have any additional gears outside of the cartridge or is the motor going direct?
1 Like
Thanks for getting back to us @Hudsonville_Robotics :
The motors are for the arm and claw. The brain is not driving different distances than what we defined in our cod. We do have additional gears outside of the cartridge on the arm but the claw is going direct to the motor. The problem is with both of these motors.
Our code:
The brain itself is not going to know what cartridge you have in when the program isn’t running, it is not made to store that information. All that matters is that it knows what cartridge it is when the programs running, which it should right now since you have the cartridge set in the code. If you wish to test motors with that cartridge outside of a program, simply tap on where it says gears 18:1 and it will change, swapping between red, blue and green cartridges so you can test motors, this will not permanently store the data and will get wiped when leaving that screen.
1 Like
I am a little concerned with the Spin Claw Open block. That tells the motor to spin and never tells it to stop. This will heat up if not burn out your motors. I would think that you would want to use a Spin For to give it specific length of travel like the arm. If not then you should follow up the wait 1 second with a Stop.

You might want to set the set motor stopping to hold instead of break if you want to to maintain the position where it is stopped.

Finally you will need to calculate the arm movement with the additional gears. The degrees setting in code is the motor only. Based on the photo of your arm (assuming 84 tooth gear) you would want to multiply degrees by seven.
Example - 84 tooth : 12 tooth external gear ratio is 7:1 so 90 motor degrees x 7:1 is 630 degrees in programming.
1 Like