View unanswered posts | View active topics It is currently Sat Aug 23, 2014 4:02 am






Reply to topic  [ 2 posts ] 
Sample Joystick 2 Code not functioning 
Author Message
Rookie

Joined: Thu Dec 22, 2011 12:24 pm
Posts: 2
Post Sample Joystick 2 Code not functioning
Hello all, I am very new to RobotC and trying to learn this launguage before the FRC compition. I have but a few weeks to understand how the functions work and how I can program this robot using the RobotC launguage.

After pairing my NXT brick and computer via bluetooth, I installed the drivers for the Logitech controler. I then tested the controler in the "Control Panel" and in the "Debug" window in RobotC.

I was able to get feedback from the controls. I then opened the sample program file and proceeded to download it to the device.

Nothing... I coun't get the robot to react to the controls. Is there something that I was missing??

The Code is as follows:

Code:

#include "JoystickDriver.c"     // Tells ROBOTC to include the driver file for the joystick.



task main()
{
 while(true)
  {
    getJoystickSettings(joystick);  // Update Buttons and Joysticks
    motor[motorC] = joystick.joy1_y1;
    motor[motorB] = joystick.joy1_y2;
  }
}
 


Thu Dec 22, 2011 12:34 pm
Profile
Rookie

Joined: Thu Dec 22, 2011 12:24 pm
Posts: 2
Post Re: Sample Joystick 2 Code not functioning
I have found the answer. If the Joystick Control Debugger Window is not open, the controler will not function.

In short, the "joystick control debug window" MUST be open in order for the joystick to work.


Thu Dec 22, 2011 12:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 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:  



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