View unanswered posts | View active topics It is currently Fri Aug 29, 2014 2:22 pm






Reply to topic  [ 4 posts ] 
Messed up Joystick or faulty firmware? 
Author Message
Rookie

Joined: Wed Oct 09, 2013 3:55 pm
Posts: 19
Post Messed up Joystick or faulty firmware?
Ok, I am making a rubber band shooter. I built the smallest model I could so other people would have a harder time shooting my bot. As I am programming it, I keep finding difficulties that shouldn't be there.
Code:
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1,  ,               sensorQuadEncoderOnI2CPort,    , AutoAssign)
#pragma config(Motor,  port1,           Right,         tmotorVex393, openLoop)
#pragma config(Motor,  port4,           Shooter,       tmotorVex393, openLoop, encoder, encoderPort, I2C_1, 1000)
#pragma config(Motor,  port5,           Arm,           tmotorVex393, openLoop)
#pragma config(Motor,  port10,          Left,          tmotorVex393, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
   while(1)
      {
      while(vexRT[btn8R] == 1)
         motor[Arm] = 127;
      while(vexRT[btn8D] == 1)
         motor[Arm] = -65;
      motor[Arm] = 0;
   }
}

This is a perfectly normal code for a robot, yet it doesn't work. Later i found that when I pushed the btn5D, it worked. The last code I had (same robot, same joystick) worked perfectly normal. The analog sticks are fine, and so are the gyro's. Please help me!!!


Mon Dec 02, 2013 5:12 pm
Profile
Rookie

Joined: Wed Oct 09, 2013 3:55 pm
Posts: 19
Post Re: Messed up Joystick or faulty firmware?
Up. I have to finish this pretty quick, and its not my robot. I must know how to fix this.


Wed Dec 04, 2013 4:12 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 566
Post Re: Messed up Joystick or faulty firmware?
Which joystick controller specifically are you using for this program? Are you using a VEXNet Joystick Controller, or a different USB joystick controller that's plugged into the computer?

Which buttons on the joystick are making the arm move (ie, btn5D, btn8R, etc) and which direction are they making the motor move? Finally, what version of ROBOTC is being used on the computer that is not working (this can be found through the 'Help -> About ROBOTC' menu option, in the bottom left corner of the window that pops up).

The code itself looks like it should be ok, so this may just be a configuration issue.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Wed Dec 04, 2013 5:14 pm
Profile
Rookie

Joined: Wed Oct 09, 2013 3:55 pm
Posts: 19
Post Re: Messed up Joystick or faulty firmware?
I am using a VEXNet Joystick and controler. Btn8R to move up, and Btn8D to move down, and the motors don't move at all (at least when I press the correct buttons). I am at my school, so I cant update, but my version is 3.61.


Fri Dec 06, 2013 5:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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

Search for:
Jump to:  



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