Hi I am new, trying to program the vex edr clawbot the claw only closes but does not open I tried vearious programs and samples. Any pointer help will be regarding this will be helpful thanks.
Firstly, What language are you using? EasyC or ROBOTC?
Secondly, please post your code so that we can see what the problem is.
Thanks
I am using Easyc as my programming language
my program I have used only closes the claw does not open it:
task main()
{
motor[port6] = 50; //Turn on claw motor to open
wait(1); //Wait for 1 second
motor[port6] = 0; //Stop claw motor
wait(1); //Wait for 1 second
motor[port6] = -50; //Turn on claw motor to close
wait(1); //Wait for 1 second
}
Isn’t the wait() function in milliseconds in EasyC?
Yes it is in milliseconds as far as I know… try inserting 1000 instead of 1.
It still does not work the claw would not open
You might want to try flipping the motor wires just to test if the motor then only opens and doesn’t close. Assuming you made the switch to milliseconds suggested above and your motors are set up properly, etc., that might tell you if you have a bad motor controller that only turns one way. That’s a problem that’s happened to us, though I’m not sure how common that is.
Thanks for the tips finally my claw starts opening using the program