View unanswered posts | View active topics It is currently Wed Jul 30, 2014 7:19 pm






Reply to topic  [ 6 posts ] 
Using two remotes 
Author Message
Rookie

Joined: Wed Nov 12, 2008 10:47 pm
Posts: 8
Post 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;

}
}


Fri Jan 16, 2009 6:12 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 601
Post Re: Using two remotes
Well this code crashed my ROBOTC... so anyone else out there, don't copy and paste it into a new program!

I'll investigate the issue and post fixed code or an explanation ASAP.

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Fri Jan 16, 2009 6:23 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 601
Post Re: Using two remotes
I believe the issue is as follows:
Code:
getJoystickSettings(joystick):

That should be a semi-colon, not a colon.

I went ahead and moved your code into the new FTC templates for Teleop. See it attached to this post. It compiles and works for me.


Attachments:
Modified_TeleOp.c [3.69 KiB]
Downloaded 181 times

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net
Fri Jan 16, 2009 6:27 pm
Profile
Rookie

Joined: Wed Nov 12, 2008 10:47 pm
Posts: 8
Post 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.


Sun Jan 18, 2009 1:15 am
Profile
Rookie

Joined: Thu Jan 08, 2009 7:51 pm
Posts: 25
Post Re: Using two remotes
When you say 3 pairs of motors, how are they wired?

_________________
It must be user error.


Sun Jan 18, 2009 3:25 am
Profile WWW
Rookie

Joined: Wed Nov 12, 2008 10:47 pm
Posts: 8
Post 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.


Sun Jan 18, 2009 10:54 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 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:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.