View unanswered posts | View active topics It is currently Sun Sep 21, 2014 8:13 pm






Reply to topic  [ 6 posts ] 
HELP!!! 
Author Message
Rookie

Joined: Thu Feb 16, 2012 1:03 pm
Posts: 7
Post HELP!!!
This program is not working. I compile and download and it runs the autonomous mode, but as soon as it finishes what I need the robot to do there, the controler doesn't start working. I need help as soon as possible!!! :breakcomputer:


#pragma config(Sensor, in1, lineTrackerLeft, sensorLineFollower)
#pragma config(Sensor, in2, lineTrackerCenter, sensorLineFollower)
#pragma config(Sensor, in3, lineTrackerRight, sensorLineFollower)
#pragma config(Sensor, dgtl4, limitSwitch, sensorTouch)
#pragma config(Motor, port2, rightMotor, tmotorNormal, openLoop, reversed)
#pragma config(Motor, port3, leftMotor, tmotorNormal, openLoop)
#pragma config(Motor, port4, rightElbow, tmotorNormal, openLoop, reversed)
#pragma config(Motor, port5, leftElbow, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{

startMotor (rightElbow, -40);
startMotor (leftElbow, -40); // move arm down
untilTouch (limitSwitch); // stop arm when limit switch is hit
stopMotor (rightElbow); // stop motor
stopMotor (leftElbow);
wait(5); // wait 5 seconds
startMotor (rightMotor, 127);
startMotor (leftMotor, 127); // move forward at full speed
wait (5); // wait 5 seconds
stopMotor (rightMotor);
stopMotor (leftMotor); // stop forward motion
** start of romote control**
while (vexRT [Btn7D] ==0) // wait untiil down button in group 7 is pressed to start remote control section of program
{
}

motor(rightMotor) = vexRT (Ch2); // right wheel = right joystick vertical motion
motor(leftMotor) = vexRT (Ch3); // left wheel = left joystick vertical motion
if(vexRT [Btn6D] == 1)
{
motor [rightElbow] = -65; // right motor controling arm moves down when down button in group 6 is pressed
}
else if(vexRT [Btn6U] == 1)
{
motor [rightElbow] = 65; // right motor controling arm moves up when up button in group 6 is pressed
}
else
{
motor [rightElbow] = 0; // when no group 6 button is pressed, no motion in right arm motor
}
if(vexRT [Btn5D] == 1)
{
motor [leftElbow] = -65; // left motor controling arm moves down when down button in group 7 is pressed
}
else if(vexRT [Btn5U] == 1)
{
motor [leftElbow] = 65; // left motor controling arm moves up when up button in group 7 is pressed
}
else
{
motor [leftElbow] = 0; // when no group 7 button is pressed, no motion in left arm motor
}

}


Tue Feb 21, 2012 7:53 pm
Profile
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post Re: HELP!!!
You need a while(true) loop around your remote control code. A side note, this in in the FTC forums. I'm sure a mod will move it soon, but just remember to post VEX questions in the "ROBOTC for Cortex and PIC" forum next time. Also, to make your code more readable and preserve formatting, you can put your code in the
Code:
[code][/code]
tags next time.

_________________
sudo rm -rf /


Tue Feb 21, 2012 8:03 pm
Profile
Rookie

Joined: Thu Feb 16, 2012 1:03 pm
Posts: 7
Post Re: HELP!!!
magicode wrote:
You need a while(true) loop around your remote control code. A side note, this in in the FTC forums. I'm sure a mod will move it soon, but just remember to post VEX questions in the "ROBOTC for Cortex and PIC" forum next time. Also, to make your code more readable and preserve formatting, you can put your code in the
Code:
[code][/code]
tags next time.


Thank you! And sorry. I'll remember that next time :programmer:


Tue Feb 21, 2012 8:07 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: HELP!!!
Also, don't cross post the same question to multiple sub forums. It also helps to put something a little more descriptive than "Help!!" in your subject line. Most people who come here need help and as you can well imagine, having a 1000 threads all named "Help!!" is anything but helpful. A good subject line is more likely to attract the people who know something about your problem than a non-descript one. It's like walking into a room full of people who are all very good at different things and saying "I need help" and not saying what the issue is. Do you think they're all going to ask you what the problem is? Not likely! If you walk into the room and say "Hey, I have some issues with X", the two people who know something about X will come to you and say "Tell us more about the issue you're having." Do you see what I mean?

So in short:
  • Don't post the same question to multiple sub forums
  • Everyone who asks questions in here would like to be helped as soon as possible. Adding exclamation points does not make us help you any faster.
  • Use short and descriptive subject lines
  • Wrap your code in tags for readability

That's all :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Feb 22, 2012 3:44 am
Profile WWW
Rookie

Joined: Fri Jan 20, 2012 1:20 am
Posts: 6
Post Re: HELP!!!
my robot c and cortex and pic brain, started smoking through one of the ports, not the USB nor the battery, but from the brain the port that looks like a phone-line, what connections i had was my controller to my brain using an a to a cable, both had battery's, one may or may not have been almost dead. i have no way of knowing, but the brain battery had 7 volts measured by a (don't know the name) volt measure. any idea why? if any please respond quickly.


Sun Mar 11, 2012 3:51 pm
Profile
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post Re: HELP!!!
tlrmrtn wrote:
my robot c and cortex and pic brain, started smoking through one of the ports, not the USB nor the battery, but from the brain the port that looks like a phone-line, what connections i had was my controller to my brain using an a to a cable, both had battery's, one may or may not have been almost dead. i have no way of knowing, but the brain battery had 7 volts measured by a (don't know the name) volt measure. any idea why? if any please respond quickly.

I suggest asking this over here That site deals more with hardware q's.

//Andrew

_________________
Check out my website! www.RoboDesigners.com

VRC Team 2190

Twitter: @RoboDesigners


Sun Mar 11, 2012 10:56 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 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.