|
nelsonabo
Rookie
Joined: Wed Nov 12, 2008 10:47 pm Posts: 8
|
 Using two remotes
My name is Maria, captain of the Stissing Mountain FTC team. We are having a problem programming our robot using two remotes. We have three pairs of remotes, two pairs are 12V motors, one pair are nxt motors. When we program one remote using two pairs of motors, 12V or 12V and nxt our program works fine. When we try to program using all three pairs of motors using a second remote, so we can use all our motors, our program does not work, completely. It just sits, so it doesn't get through any part of our program. It downloads and has no error messages, and we've checked it many times, so we are quite baffled. We're not sure if it is the program or the wiring of our motors. Included is a copy of our program.
#pragma config(Hubs, S1, HTMotor, Htmotor, none, none) #pragma config(Motor, motorA, , tmotorNormal, PIDControl) #pragma config(Motor, motorC, , tmotorNormal, PIDControl) #pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, openLoop) #pragma config(Motor, mtr_S1_C1_2, motorE, tmotorNormal, openLoop) #pragma config(Motor, mtr_S1_C2_1, motorF, tmotorNormal, openLoop) #pragma config(Motor, mtr_S1_C2_2, motorG, tmotorNormal, openLoop)
#include “JoystickDriver.c”
task main () {
while (true) { getJoystickSettings(joystick): motor[motorD] = joystick.joy1_y1*0.5; motor[motorE] = -joystick.joy1_y1*0.5; motor[motorF] = joystick.joy2_y1; motor[motorG] = joystick.joy2_y2; motor[motorA] = joystick.joy1_y2; motor[motorC] = joystick.joy1_y2;
} }
|
|
nelsonabo
Rookie
Joined: Wed Nov 12, 2008 10:47 pm Posts: 8
|
 Re: Using two remotes
tfriez,
First of all, thank you for replying.
Maria made a mistake when she typed up her post. Our program DID have a ; not a colon:
We have been trying out our programs directly without the tele-op set-up. In other words, we have been taking the sample programs, modifying them, and compiling them directly.
Is it possible that the sample programs do not allow us to run more than two 12V motors and that is why we can't get more than 2 motors to run (we did go to the motors and sensors set-up and we set up a motor E and F as 12V motors)?
I am afraid that the problemmay be a wiring problem. We tried to attach a diagram of our wiring, but we could not get the forum to accept our attachment. I understand this forum is only for programming issues. If no programming suggestions work, we will post to the FTC forum
Anyway, we will try your version on Tuesday.
|
|
nelsonabo
Rookie
Joined: Wed Nov 12, 2008 10:47 pm Posts: 8
|
 Re: Using two remotes
I have an NXT cable going from sensor port 1 to the motor controller box. Do I need another NXT cable going from that motor controller box to the second motor controller box? (We are not using any servos so opted to use 2 motor controller boxes. One motor controller box has the red and black wires from the batteries (and on/off switch). Another set of black and red wires go to the 2nd motor controlller box.
The 1st motor controller box has red and black wires going to a pair of 12V motors (drives the robot) The 2nd motor controller bax has red and black wires going to a second pair of 12V motors (lifts and lowers the arm) The NXT motors are connected to the NXT outputs A and C (swivels a dump truck type bucket at the end of the arm)
We we have 3 pairs of motors, 2 pairs are 12V motors and one pair are NXT motors.
|