View unanswered posts | View active topics It is currently Sat Dec 20, 2014 11:21 pm






Reply to topic  [ 3 posts ] 
servos will not move 
Author Message
Rookie

Joined: Tue Jan 20, 2009 5:06 pm
Posts: 10
Post servos will not move
The servos wont move, and idk y. (I have the newest robotC). I checked the motors and sensors setup, and thats all good. heres the pgrm
Code:
#pragma config(Hubs,  S1, HTMotor,  HTServo,  none,     none)
#pragma config(Motor,  motorD,          ,        tmotorNormal, PIDControl, )
#pragma config(Motor,  motorE,          ,       tmotorNormal, PIDControl, )
#pragma config(Servo,  servo1,          ,               tServoNormal)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "JoystickDriver.c"

task main()
{
  while (true)
  {
    getJoystickSettings(joystick);

    //nxtDisplayBigStringAt(20,15, (string)joystick.joy1_y1);
    //nxtDisplayBigStringAt(35,30, (string)joystick.joy1_y2);

    //motor[MotorD] = joystick.joy1_y1;
    //motor{MotorE] = joystick.joy1_y2;

    //if (joy1Btn(1))
      //motor[MotorD] = 20;
    //else
      //motor[MotorD] = 0;

      //if (joy1Btn(2))
       //motor[MotorE] = 30;
      //else
        //motor[MotorE] = 0;
   
    servoTarget[servo1] = joystick.joy1_y1;

   }
}
help please


Tue Jan 20, 2009 5:58 pm
Profile
Rookie

Joined: Tue Jan 20, 2009 5:06 pm
Posts: 10
Post Re: servos will not move
Can someone please help? We're running out of time.


Tue Jan 27, 2009 5:48 pm
Profile
Rookie

Joined: Thu Jan 08, 2009 7:51 pm
Posts: 25
Post Re: servos will not move
Try changing servoTarget[] to just servo[] and try renaming servo1 to something else.

_________________
It must be user error.


Tue Jan 27, 2009 7:17 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.