Log in

View Full Version : ROBOTC servo code fails after update


stuart1086
09-11-2011, 16:55
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:
#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.

Matthew Blake
09-11-2011, 21:29
Have you tried making sure the CRIO Firmware is up to date?

Have you tried making sure the Driver Station Software is up to date?

stuart1086
11-11-2011, 16:11
This is FTC, not FRC. No CRIOs over here, just NXT bricks.

Matthew Blake
12-11-2011, 15:21
This is FTC, not FRC. No CRIOs over here, just NXT bricks.

Ah sorry, my mistake. :rolleyes:

Have you tried updating the firmware on your NXT Brick?
Use a USB Cable to connect the brick to your computer with ROBOTC on it and try updating the Brick's firmware. Our team recently had a problem with our NXT Bricks and updating the firmware seemed to solve it.

Ether
12-11-2011, 15:56
This is FTC, not FRC. No CRIOs over here, just NXT bricks.

Did you try posting to the FTC forum ?

Foster
12-11-2011, 18:09
Did you download the new RobotC firmware to the controller?

We've found that the RobotC versions must have the right firmware.

wilsonmw04
13-11-2011, 20:52
LONG story, but we figured out our problem.
Here's some insight to the issue: Version 1.4 doesn't play well with Tetrix. Version 3, on the other hand, plays nicely with the hardware.

Thank you all for your replies.