View unanswered posts | View active topics It is currently Sat May 18, 2013 9:10 pm






Reply to topic  [ 7 posts ] 
Robot c and Tetrix motors using hitechnic motor controller 
Author Message
Rookie

Joined: Thu Oct 06, 2011 1:13 pm
Posts: 3
Post Robot c and Tetrix motors using hitechnic motor controller
Having some trouble getting the motor to operate. New to robotc and the FTC equipment
Based our hookup on the testbed1 sample program but the simplified to a single motor continuous run without the button
We have the HiTechnic DC motor controller and DC motors ( silver gearmotors, not LEGO)
Have. downloaded firmware to NXT
Have specified platform as Lego mindstorm nxt+ tetrix
Battery charged, power light on

Simple program

motor[motorD] = 25

Program compiles and uploads to NXT
program visible in NXT,
can run from computer console and from nXT keypad. Shows running

seems to be running but motor does not turn
Any suggestions


Thu Oct 06, 2011 1:31 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1023
Post Re: Robot c and Tetrix motors using hitechnic motor controll
Please post your entire code including the #pragma's.


Thu Oct 06, 2011 1:39 pm
Profile
Rookie

Joined: Thu Oct 06, 2011 1:13 pm
Posts: 3
Post Re: Robot c and Tetrix motors using hitechnic motor controll
#pragma config(Hubs, S1, HTMotor, none, none, none)
#pragma config(Sensor, S2, touch, sensorTouch)
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{



motor[motorD] = 25; //...spin Motor D at 25% power.


}


Thu Oct 06, 2011 2:00 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1023
Post Re: Robot c and Tetrix motors using hitechnic motor controll
Several things to check:
- make sure the motor controller is indeed connected to sensor port 1 (S1).
- make sure the motor controller is powered (red light on).
- make sure the Tetrix motors are connected to "motor" terminals correctly and securely.
- change the motor power to higher values to at least 50 (or even 100). 25 is usually very weak and may not move the robot if your robot is heavy.
- add a line to turn on motorE as well, in case motorD is fried.
- make sure the program is indeed downloaded to the NXT and is running.

That's all I can think of at the moment.


Thu Oct 06, 2011 2:07 pm
Profile
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 495
Post Re: Robot c and Tetrix motors using hitechnic motor controll
try this:
Code:
task main(){
  while(true){
    motor[motorD] = 50;
  }
}

_________________
sudo rm -rf /


Thu Oct 06, 2011 2:17 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1023
Post Re: Robot c and Tetrix motors using hitechnic motor controll
Ah yes, forgot that the motor will turn off if your program ends. So the while loop will keep it powered.


Thu Oct 06, 2011 2:19 pm
Profile
Rookie

Joined: Thu Oct 06, 2011 1:13 pm
Posts: 3
Post Re: Robot c and Tetrix motors using hitechnic motor controll
Thank you for the insight. The students covered your suggestions and within 10 min were programming movement and within an hour, programming complex movement. BTW this is Woodward Academy in College Park GA. a Middle school team. FIRST FTC. and first year team.


Fri Oct 07, 2011 7:16 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 4 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.