View unanswered posts | View active topics It is currently Sun Dec 21, 2014 3:24 pm






Reply to topic  [ 7 posts ] 
First Robot, First Problems 
Author Message
Rookie

Joined: Thu Nov 15, 2012 7:33 pm
Posts: 4
Post First Robot, First Problems
Hello all,

I have recently joined my schools robotics team because they needed programmers, and I am fairly proficient in java (and heard c++ is quite similar) so I joined but I am having some really annoying results, or lack there of. We built the Ranger bot from this site http://www.tetrixrobotics.com/GettingStartedGuide/ and followed all of the steps exactly. But for some reason when I run the program, nothing happens. Am I using the wrong version? Please help...

Thanks,
Brad


Thu Nov 15, 2012 7:39 pm
Profile
Novice

Joined: Sun Oct 21, 2012 10:01 pm
Posts: 76
Post Re: First Robot, First Problems
Can you please post the code you used, along with a description of the setup of the wiring (where the motor controllers/motor wires/battery wires are going)?


Fri Nov 16, 2012 3:29 am
Profile
Rookie

Joined: Thu Nov 15, 2012 7:33 pm
Posts: 4
Post Re: First Robot, First Problems
amcerbu wrote:
Can you please post the code you used, along with a description of the setup of the wiring (where the motor controllers/motor wires/battery wires are going)?


Here is the code I used

#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, openLoop, reversed)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorNormal, openLoop)
#pragma config(Servo, srvo_S1_C2_1, servo1, tServoNone)
#pragma config(Servo, srvo_S1_C2_2, servo2, tServoNone)
#pragma config(Servo, srvo_S1_C2_3, servo3, tServoNone)
#pragma config(Servo, srvo_S1_C2_4, servo4, tServoNone)
#pragma config(Servo, srvo_S1_C2_5, servo5, tServoNone)
#pragma config(Servo, srvo_S1_C2_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{
//go forward for 2 seconds
motor[motorD]=15;
motor[motorE]=15;
wait1Msec(2000);

//stop for 1 second
motor[motorD]=0;
motor[motorE]=0;
wait1Msec(1000);

//turn around
motor[motorD]=90;
motor[motorE]=-90;
wait1Msec(1000);

//stop for 1 second
motor[motorD] = 0;
motor[motorE] = 0;
wait1Msec(1000);

//go forward for 2 seconds
motor[motorD]=15;
motor[motorE]=15;
wait1Msec(2000);

//stop
motor[motorD] = 0;
motor[motorE] = 0;
}

and I attaced a pic of the entire thing
Attachment:
File comment: The robot
182550_226568824141462_1034931549_n.jpg
182550_226568824141462_1034931549_n.jpg [ 41.01 KiB | Viewed 2170 times ]


Sat Nov 17, 2012 11:29 am
Profile
Rookie

Joined: Thu Nov 15, 2012 7:33 pm
Posts: 4
Post Re: First Robot, First Problems
Attachment:
wiring.PNG
wiring.PNG [ 69.44 KiB | Viewed 2170 times ]
And here is a better shot at the wiring


Sat Nov 17, 2012 11:33 am
Profile
Novice

Joined: Sun Oct 21, 2012 10:01 pm
Posts: 76
Post Re: First Robot, First Problems
Your code and wiring look fine; the only thing I can possibly imagine is that you're not giving the motors enough power on the "forward" sections. Sometimes, low values for motor power (especially on high-load applications) won't function at all. Try replacing all the 15's with 100's, and see if that helps. Other than that, everything looks right to me.

When you start the program on the NXT, does it say the program is running? Is the NXT firmware up to date with your version of RobotC?

Try testing the motors individually to make sure they're not broken or damaged.

Code:
#pragma config(Hubs, S1, HTMotor, none, none, none)
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
  while (true)
  {
    motor[motorD] = 100;
  }
}


EDIT: Also, make sure your Tetrix battery is fully charged.


Sat Nov 17, 2012 11:09 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 619
Post Re: First Robot, First Problems
Along with what amcerbu has suggested, double check the obvious; are the motor and servo controllers receiving power (meaning, is the switch turned to on)? It may seem like a no-brainer, but I know how many times I've personally forgotten to turn the robot's motors on and was left scratching my head on why it's not working. Make sure you have the red lights on before you tear the robot apart looking for a solution!

_________________
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


Mon Nov 19, 2012 1:06 pm
Profile
Rookie

Joined: Thu Nov 15, 2012 7:33 pm
Posts: 4
Post Re: First Robot, First Problems
Charging the tetrix battery to the max fixed it... lol thanks guys


Mon Nov 26, 2012 8:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.