So I recently salvaged this old VEX claw-bot, and I had to wipe the programming because it went rouge. Can someone please guide me through ROBOTC? I have no idea what i’m doing and I don’t know how to reprogram this metal demon
Here’s a simple code to get you started
while(true){
//Button presses
if(vexRT[Btn5U] == 1){
motor[arm] = 127; // Full forward
}
else if(vexRT[Btn5D] == 1){
motor[arm] = -127; // Full backward
}
else{
motor[arm] = 0; //Stop
}
//Simple Arcade:
motor[leftMotor1] = vexRT[Ch2] + vexRT[Ch1];
motor[leftMotor2] = vexRT[Ch2] + vexRT[Ch1];
motor[rightMotor1] = vexRT[Ch2] - vexRT[Ch1];
motor[rightMotor2] = vexRT[Ch2] - vexRT[Ch1];
}
For motors and sensors setup, you add the default green motors as 393’s, no IME’s or whatever since regular 393’s are not “intelligent.” Controller doesn’t need to be added to the motors and sensors setup.
3 Likes
Thank you so much! I’ll try to recode it this weekend.