|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 !!*// |
|
#2
|
|||
|
|||
|
Re: [FTC]: Servo daisy chain problem
Quote:
I did not think that was possible. When I used the motor and sensor setup tab it gave me an error when I tried to define a sensor port (S4) as 2 different things. |
|
#3
|
|||
|
|||
|
Re: [FTC]: Servo daisy chain problem
Thanks for the responses, everyone. In the time since I first posted, I found an odd peculiarity with robotc that seems to be the culprit: it seems as though it is indeed impossible for RobotC to properly recognize a servo when used in a daisy chain run through the 4th port, wherein it is not first in the chain. I found this out through simple trial and error, changing nothing but the ports and position of the servo and its controller. My team and I just switched a sensor multiplexer to port four and then put the controller chain in port 3, and voila! Problem solved. Feel free to verify, but at least in my version of robotc (3.62), which should be the latest, this seems to be the only way around the oddly-specific issue.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|