Go to Post The game transcends the competition, and this is beautiful. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 09-11-2011, 16:55
stuart1086 stuart1086 is offline
Registered User
FTC #1086
 
Join Date: Nov 2011
Location: Richmond, VA
Posts: 3
stuart1086 is an unknown quantity at this point
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.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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