View Single Post
  #3   Spotlight this post!  
Unread 17-03-2014, 12:12
FTC4211's Avatar
FTC4211 FTC4211 is offline
Registered User
AKA: John Stegeman
FTC #4211 (The Bombers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2010
Location: Missouri
Posts: 11
FTC4211 is an unknown quantity at this point
Re: [FTC]: Servo daisy chain problem

I think the problem is that RobotC didn't add in the necessary pragmas to have controllers on the ports S1, and S4.

This should work:

Code:
#pragma config(Hubs,  S1, HTMotor,  HTMotor,  none,     none)
#pragma config(Hubs,  S4, HTMotor,  HTMotor,  HTServo,  none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Sensor, S2,     gyro,           sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3,     HTSMUX,         sensorI2CCustom)
#pragma config(Sensor, S4,     ,               sensorI2CMuxController)
#pragma config(Motor,  motorA,          bristle,       tmotorNXT, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C1_1,     liftLeft,      tmotorTetrix, openLoop, reversed)
#pragma config(Motor,  mtr_S1_C1_2,     backLeft,      tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_1,     frontLeft,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_2,     flagRaiser,    tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S4_C1_1,     liftRight,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S4_C1_2,     frontRight,    tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S4_C2_1,     backRight,     tmotorTetrix, openLoop, encoder)
#pragma config(Motor,  mtr_S4_C2_2,     dropper,       tmotorTetrix, openLoop)
#pragma config(Servo,  srvo_S4_C3_1,    ploop,                tServoStandard)
#pragma config(Servo,  srvo_S4_C3_2,    servo2,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_3,    servo3,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
Reply With Quote