Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   ROBOTC servo code fails after update (http://www.chiefdelphi.com/forums/showthread.php?t=98191)

stuart1086 09-11-2011 16:55

ROBOTC servo code fails after update
 
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.

Matthew Blake 09-11-2011 21:29

Re: ROBOTC servo code fails after update
 
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

Re: ROBOTC servo code fails after update
 
This is FTC, not FRC. No CRIOs over here, just NXT bricks.

Matthew Blake 12-11-2011 15:21

Re: ROBOTC servo code fails after update
 
Quote:

Originally Posted by stuart1086 (Post 1084725)
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

Re: ROBOTC servo code fails after update
 
Quote:

Originally Posted by stuart1086 (Post 1084725)
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

Re: ROBOTC servo code fails after update
 
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

Re: ROBOTC servo code fails after update
 
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.


All times are GMT -5. The time now is 23:36.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi