View unanswered posts | View active topics It is currently Thu Nov 26, 2015 8:18 pm

Reply to topic  [ 5 posts ] 
FTC Joystick Programming 
Author Message

Joined: Thu Oct 23, 2008 6:49 pm
Posts: 3
Location: Tahoma Junior High
Post FTC Joystick Programming
:breakcomputer: :breakcomputer: :breakcomputer:

We need help.
We have tried all the sample programs we could find. Trying to edit them to work does nothing.
And no, we did not forget to add #include "JoystickDriver.c" at the top.
We have the Logitech controller hooked up to the USB Port. All its software is installed and ready to go.
All the ports are 2.0.
The computer (a laptop) has Bluetooth.
The laptop is Windows Vista and practically brand new.
Both the NXT and the laptop showed that they were connected.
There are no errors, the controller doesn't appear to be having any affect on the program.
What can we do? We have wracked our brains out for, oh, about an hour or so.
Here is an example of a sample program we tried:

#include "JoystickDriver.c" // This file does all of the processing of the BT Packet
task main()
while (true)
//Check for new BT Packet and update the variables for the joystick positions
if(joy1Btn(1)) //if Button 1 on Joy1 is pressed
servo[servo1] = 200; //Move servo #1 to position 200
else //if Button 1 on Joy1 is not pressed
servo[servo1] = 50; //Move servo #1 to position 50

Thu Oct 23, 2008 7:06 pm
User avatar

Joined: Sat Sep 20, 2008 12:16 pm
Posts: 106
Location: Curently fighting aliens on P3X-828
Post Re: FTC Joystick Programming
It doesn't look like your code is the problem.
Are you running the code in FTC mode?

Sorry, your program could not be downloaded. Please reboot your computer.
FTC Team #2959 Team Smash Bros CLICK HERE.(or click www)
What the world needs is more geniuses with humility, there are so few of us left.


Thu Oct 23, 2008 8:46 pm
Profile WWW

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: FTC Joystick Programming
I suggest opening the Servos debug window and trying to set the servo to different positions manually. If that doesn't work then you probably have a wiring problem.

Jeff McBride
Benson Robotics Club

Thu Oct 23, 2008 10:04 pm
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 620
Post Re: FTC Joystick Programming
Do you have the ROBOTC Joystick Debugger Window open? It will not send Joystick Messages until you have that window open.

You can find those by download your program, and then going to "Robot - Debug Windows - Joystick" with the debugger window open.

Timothy Friez
ROBOTC Developer - SW Engineer

Fri Oct 24, 2008 2:52 pm

Joined: Thu Oct 23, 2008 6:49 pm
Posts: 3
Location: Tahoma Junior High
Post Re: FTC Joystick Programming
:D Thank you, all of you!
tfriez especially! They were all possibilities and his just happened to work.
I'm glad I contacted you.
Thanks from all of TJH Robotics Club!

Tue Oct 28, 2008 5:45 pm
Display posts from previous:  Sort by  
Reply to topic   [ 5 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.