View unanswered posts | View active topics It is currently Sun Jul 12, 2020 12:56 pm

Reply to topic  [ 2 posts ] 
Third Motor Setup 
Author Message

Joined: Sun Nov 02, 2008 6:28 pm
Posts: 6
Post Third Motor Setup
After adding more motors besides the ones driving the bot, is there any additional things we have to change in the Robot C program?
Does RobotC automatically recognize the additional motors in the motor setup?

Also how can these motor be attached?
Do we NEED to have a second motor controller or is there a way to do it with just one?

Mon Jan 05, 2009 4:03 pm

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: Third Motor Setup
Each motor controller can individually control up to 2 motors. It is possible, however, to have more than one motor attached to each motor port if you want them to do exactly the same thing. For example you could have two motors on the left side of your robot hooked to one motor port and two motors on the right side of your robot hooked to the other motor port on a single controller. If you want independant control of three or four motors you will need a second motor controller which you will need to either daisy-chain with your other motor and servo controllers or hook up to another sensor port. In any case you will need to go into the Motor and Sensor Setup wizard and tell it how you wired the second motor controller. Then the new motor ports will show up on the Motors tab of the wizard and you can configure them as needed. You need to make sure that you have the PID checkbox set correctly for each motor. The default value is for the additional motors to have PID control turned on. If you DO NOT have shaft encoders installed on the motors you MUST turn off PID control or they will not work properly.

Here is an example set of #pragmas created by the wizard for a typical four motor configuration:
#pragma config(Hubs,  S1, HTMotor,  HTServo,  HTMotor,  none)
#pragma config(Sensor, S2,     TouchMux,            sensorHiTechnicTouchMux)
#pragma config(Sensor, S3,     ColorSensor,         sensorI2CHiTechnicColor)
#pragma config(Sensor, S4,     CompassSensor,       sensorI2CHiTechnicCompass)
#pragma config(Motor,  mtr_S1_C1_1,     motorLeft,     tmotorNormal, openLoop, reversed)
#pragma config(Motor,  mtr_S1_C1_2,     motorRight,    tmotorNormal, openLoop)
#pragma config(Motor,  mtr_S1_C3_1,     motorArm2,     tmotorNormal, PIDControl, reversed)
#pragma config(Motor,  mtr_S1_C3_2,     motorArm1,     tmotorNormal, PIDControl, reversed)
#pragma config(Servo,  servo1,          dumpServos,           tServoNormal)

Jeff McBride
Benson Robotics Club

Mon Jan 05, 2009 4:20 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.