So, we had some code that displayed servos and their capabilities. After reimaging the computer and reinstalling a new version of ROBOTC, our program wouldn't work. We tried everything, programming, electrical, or otherwise. This is the elementary program we created to test if servos would move at all:
Code:
#pragma config(Hubs, S1, HTServo, none, none, none)
#pragma config(Servo, srvo_S1_C1_1, motor1, tServoNormal)
#pragma config(Servo, srvo_S1_C1_2, motor2, tServoNormal)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main(){
while(true){
//Bend it one way, wait, bend the other way
servoTarget[srvo_S1_C1_1] = 120;
servoTarget[srvo_S1_C1_2] = 120;
wait1Msec(1000);
servoTarget[srvo_S1_C1_1]= 0;
servoTarget[srvo_S1_C1_2]= 0;
wait1Msec(1000);
}
}
Is something wrong with this? Or is it ROBOTC? We have ROBOTC version 1.40.