| Author |
Message |
|
quackhacker44
Rookie
Joined: Tue Jan 20, 2009 5:06 pm Posts: 10
|
 Lego motors
How can I connect lego motors to the NXT/hightechnic motor controller? Also, how do I use them in code? Are they like regular motors? I've been searching everywhere, but I can't find an answer...
|
| Thu Feb 12, 2009 4:35 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
You can't if I know what you are talking about...Tetrix 12 DC motors instead of your Lego motors.
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 4:53 pm |
|
 |
|
quackhacker44
Rookie
Joined: Tue Jan 20, 2009 5:06 pm Posts: 10
|
 Re: Lego motors
They're orange and different shades of gray, they look kind of like the tip of a crane.
|
| Thu Feb 12, 2009 4:57 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
Can you send a link to the page where you bought them. You can't use it what I believe.
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:06 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
Probably what you have bought is this http://www.hitechnic.com/index.html?lang=en-us&target=d14.htmlThe first one! This should be in another forum I believe.
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:10 pm |
|
 |
|
quackhacker44
Rookie
Joined: Tue Jan 20, 2009 5:06 pm Posts: 10
|
 Re: Lego motors
We have those electronics, but the controllers had a black covering.
|
| Thu Feb 12, 2009 5:16 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
It's only for the Tetrix motor!! as I said.
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:20 pm |
|
 |
|
quackhacker44
Rookie
Joined: Tue Jan 20, 2009 5:06 pm Posts: 10
|
 Re: Lego motors
So the lego motors definitely cannot be used with a hightechnic motor controller on plugged in directly to the NXT?
|
| Thu Feb 12, 2009 5:22 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
No but why don't you use the other 3 ports on the NXT
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:24 pm |
|
 |
|
quackhacker44
Rookie
Joined: Tue Jan 20, 2009 5:06 pm Posts: 10
|
 Re: Lego motors
That's my question; how do you use them?
|
| Thu Feb 12, 2009 5:25 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
You have to activate it in the motor and sensor setup then copy this code.
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:33 pm |
|
 |
|
quackhacker44
Rookie
Joined: Tue Jan 20, 2009 5:06 pm Posts: 10
|
 Re: Lego motors
So, you use Lego motors like regular motors in code? Do you configure them the same way? Because I tried that and it's not working.
|
| Thu Feb 12, 2009 5:35 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
Motor controller on the sensor one (servo on the motor controller) Check battery!  |  |  |  | Quote: #pragma config(Hubs, S1, HTMotor, HTServo, none, none) #pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, PIDControl) #pragma config(Motor, mtr_S1_C1_2, motorE, tmotorNormal, PIDControl) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main() { motor[motorD] = 100; motor[motorE] = 100; wait1Msec(1000);
motor[motorD] = -50; motor[motorE] = -50; wait1Msec(1000); } |  |  |  |  |
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:39 pm |
|
 |
|
Emilhem
Novice
Joined: Tue Jan 13, 2009 5:22 pm Posts: 72 Location: USA, Pennsylvania
|
 Re: Lego motors
Sorry for my sample code here is one that makes the motors A B C on the NXT brick to run  |  |  |  | Quote: #pragma config(Motor, motorA, , tmotorNormal, PIDControl) #pragma config(Motor, motorB, , tmotorNormal, PIDControl) #pragma config(Motor, motorC, , tmotorNormal, PIDControl) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main() { motor[motorA] = 100;//running motor A on full power motor[motorB] = 100;//running motor A on full power motor[motorC] = 100;//running motor A on full power wait1Msec(1000)//take time running motor A, B, and C on full power for 1 second } //ends the program |  |  |  |  |
_________________ We need a Linux Version!
|
| Thu Feb 12, 2009 5:57 pm |
|
 |
|
chadgeorge
Novice
Joined: Fri Oct 24, 2008 8:58 am Posts: 87
|
 Re: Lego motors
FYI there are lots of samples in the sample code directory that use the NXT motors.
Also I've noticed alot of people are posting code with PIDControl turned on. I guess that's the default. My personal experience is that this causes more wackiness than its worth. At least start with it OFF then turn it back on when you need it.
I know the great RobotC folks probably spent alot of sweat, tears and blood getting those things tuned, but I haven't had a single instance yet where they actually worked reliably. But it could just be me...
|
| Fri Feb 13, 2009 10:05 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 3 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
|
|