|
Page 1 of 1
|
[ 8 posts ] |
|
Please need help, no buttons work
Author |
Message |
Saints768
Rookie
Joined: Wed Jan 29, 2014 8:56 pm Posts: 4
|
 Please need help, no buttons work
#include "JoystickDriver.c"
task main() { while(1 == 1) { getJoystickSettings(joystick);
motor[motorWright] = joystick.joy1_y1; // Motor D is assigned a power level equal to the right analog stick's Y-axis reading. motor[motorWleft] = joystick.joy1_y2; // Motor E is assigned a power level equal to the left analog stick's Y-axis reading.
if(joy1Btn(4) == 1) { motor(motorAright) = -100; } else if (joy1Btn(7) == 1) { motor(motorAright)= 100; } else { motor(motorAright)= 0; }
if(joy1Btn(4) == 1) { motor(motorAleft) = -100; } else if (joy1Btn(7) == 1) { motor(motorAleft)= 100; } else { motor(motorAleft)= 0; }
if(joy1Btn(1) == 1) { servo(servo1) = 256; } else if (joy1Btn(2) == 1) { servo(servo1)= 0; } else { servo(servo1)= 127; }
}
}
This is my code, for some reason none of the joysticks, nor joystick buttons work. They used to but now it does not for some reason. I was hoping someone here can help me. Please and thank you.
|
Wed Jan 29, 2014 9:14 pm |
|
 |
Saints768
Rookie
Joined: Wed Jan 29, 2014 8:56 pm Posts: 4
|
 Re: Please need help, no buttons work
Anybody ? 
|
Thu Jan 30, 2014 12:44 am |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Please need help, no buttons work
Have you opened the joystick dialog? If so, do the buttons on the picture respond to your pressing of them?
|
Thu Jan 30, 2014 4:28 am |
|
 |
Saints768
Rookie
Joined: Wed Jan 29, 2014 8:56 pm Posts: 4
|
 Re: Please need help, no buttons work
Yes I have and every button works
|
Thu Jan 30, 2014 4:35 am |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Please need help, no buttons work
How about this code? What does the LCD display say?
|
Thu Jan 30, 2014 4:47 am |
|
 |
Saints768
Rookie
Joined: Wed Jan 29, 2014 8:56 pm Posts: 4
|
 Re: Please need help, no buttons work
it says Ext Batt: 3.0 V nxt batt: 7.5 V FMS mssgs: 0 teleop filename:
also its blinking wait for start and its blinking even tho i already pressed start
|
Thu Jan 30, 2014 4:08 pm |
|
 |
BurningLights
Professor
Joined: Sat Aug 31, 2013 9:15 am Posts: 256
|
 Re: Please need help, no buttons work
Ah, sounds like you need to use the "Joystick Control - Competition" debug window. Use that one for joystick control, and make sure you select the "Teleop - Running" radio button. (You'll have to select "Teleop - Ready" first.)
_________________FTC Team 6100 Chariots of Fire - Programmer (2012-2013) FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014) FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015) Check out our team website at http://bluechariotsoffire.com/.
|
Thu Jan 30, 2014 7:59 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Please need help, no buttons work
Ah, sounds like you need a new battery. Ext Batt is about 12V. 3.0V is extremely low.
|
Thu Jan 30, 2014 9:55 pm |
|
|
|
Page 1 of 1
|
[ 8 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
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
|
|