View unanswered posts | View active topics It is currently Sun Nov 29, 2015 12:11 am

Reply to topic  [ 2 posts ] 
Controller with Robot C 
Author Message

Joined: Wed Mar 09, 2011 1:36 pm
Posts: 1
Post Controller with Robot C
We are a first year team to FTC and are having trouble getting started in Robot C with the code to control the robot with the joystick. Can anyone assist us with where to get information for the code?
the robot we are building will have 4 servos and 2 motors.

Wed Mar 09, 2011 1:53 pm

Joined: Sat Apr 02, 2011 3:15 pm
Posts: 6
Post Re: Controller with Robot C
Can you give me the setup of the motors and servos? What does what? For a basic tank drive, try this:

#pragma config(Hubs,  S1, HTMotor)
#pragma config(Motor,  mtr_S1_C1_1,     motorA,         tmotorNormal, openLoop)
#pragma config(Motor,  mtr_S1_C1_2,     motorB,         tmotorNormal, openLoop)

#include "JoystickDriver.c"

task main ()
  while (true)
    motor[motorA] = joystick.joy1_y1;
    motor[motorB] = joystick.joy1_y2;


Sat Apr 23, 2011 6:09 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

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.