Author |
Message |
SCarleton
Rookie
Joined: Thu Apr 07, 2011 10:53 am Posts: 5
|
 Noob havin' problems.
I have just recently opened up some Vex robot kits and downloaded RobotC. I built a recbot to spec and am trying to run simple motor functions on it. I have updated and downloaded firmware via USB with no errors. I have no problems compiling and downloading via USB, but when I start the program, the motors jerk once and do the same afterwards. I have downloaded several sample programs and had identical results. I'm hoping this is just my lack of knowledge and training. Any ideas? Here's one of the programs I tried.
#pragma config(Motor, port2, , tmotorNormal, openLoop) #pragma config(Motor, port3, , tmotorNormal, openLoop)[/color]
task main() {
motor[port2] = 127;
motor[port3] = 127; wait10Msec(2000);
motor[port2] = 0;
motor[port3] = 0; }
|
Thu Apr 07, 2011 11:01 am |
|
 |
jbflot
Site Admin
Joined: Tue May 15, 2007 9:02 am Posts: 409
|
 Re: Noob havin' problems.
The quick jerk when the VEX starts up is unavoidable. What you can do, is insert a wait at the beginning of the program to give you time to correct the placement of the robot.
|
Thu Apr 07, 2011 11:11 am |
|
 |
SCarleton
Rookie
Joined: Thu Apr 07, 2011 10:53 am Posts: 5
|
 Re: Noob havin' problems.
Thanks! That part is comforting at least. Any idea why the programs do not produce any results?
|
Thu Apr 07, 2011 1:26 pm |
|
 |
jbflot
Site Admin
Joined: Tue May 15, 2007 9:02 am Posts: 409
|
 Re: Noob havin' problems.
Are you using the newer VEX Cortex? If so, what type of motors are you using? If they're the two-wire motors, you have to use them with the Motor Controller 29's (2-3 wire converter) to use them in ports 2 and 3.
|
Thu Apr 07, 2011 3:29 pm |
|
 |
SCarleton
Rookie
Joined: Thu Apr 07, 2011 10:53 am Posts: 5
|
 Re: Noob havin' problems.
port 2 and 3 are both 3 wire motors.
|
Fri Apr 08, 2011 8:02 am |
|
 |
bfeher
Site Admin
Joined: Mon Jun 08, 2009 4:50 pm Posts: 70
|
 Re: Noob havin' problems.
Hi SCarleton,
I know that this may sound a bit inane, but have you checked that all wires are in the correct ports? Have you tried different ports (changing both your code and hardware setup)? Are you certain that the power switch is ON? (The USB will power the board but not the motors so even though it may seem ON, it is only halfway awake.) When the switch is on, battery is charged, and motors are not broken, you should hear a faint and seemingly random beeping-like noise from the motors.
Hope that this helps you,
_________________ Bence Feher
Undergraduate Intern - NREC, Robotics Academy ROBOTC - Testing/Documentation/Developer
Computer Science, Japanese, East Asian Studies University of Pittsburgh, Konan University 甲南大学
|
Fri Apr 08, 2011 10:30 am |
|
 |
SCarleton
Rookie
Joined: Thu Apr 07, 2011 10:53 am Posts: 5
|
 Re: Noob havin' problems.
Tried different ports/program; checked the battery; hear the motors hum; switched on. Still nothing 
|
Fri Apr 08, 2011 11:27 am |
|
 |
SCarleton
Rookie
Joined: Thu Apr 07, 2011 10:53 am Posts: 5
|
 Re: Noob havin' problems.
Sooooo.....I decided to bypass the programming and run the bot just from joystick controls. I set up a different cortex and synchronized it with a new controller. The motors only run for a short burst in either direction. They are not impeded. Do I need to do anything with the jumpers?
|
Wed Apr 27, 2011 10:49 am |
|
 |
jbflot
Site Admin
Joined: Tue May 15, 2007 9:02 am Posts: 409
|
 Re: Noob havin' problems.
Hello SCarleton,
Can you paste your code here for us to take a look? Do you think it's possible that your motors may be damaged?
|
Wed Apr 27, 2011 3:49 pm |
|
 |
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Noob havin' problems.
Make sure you're using motor, and not servo modules. Servos will run only for a short burst in either direction, but only have a ~120 (I think...) degree range.
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
Sun May 08, 2011 3:47 pm |
|
 |
fretless_kb
Rookie
Joined: Wed Feb 09, 2011 1:08 am Posts: 27
|
 Re: Noob havin' problems.
Just a thought did you calibrate the joystick after loading the firmware? I had a similar problem where the motor only ran in one direction but a calibration cleared it up Kb
|
Thu Jun 30, 2011 11:11 pm |
|
|