View unanswered posts | View active topics It is currently Tue Sep 22, 2020 5:59 pm

Reply to topic  [ 2 posts ] 
First VEX Robot 
Author Message

Joined: Tue Jan 27, 2015 10:20 pm
Posts: 1
Post First VEX Robot
Hello everyone! My name is Israel Cobell and I go to a engineering school. We just started a new project involving the VEX robotics kits and my role in the group is the programmer, yet I will still be helping build the robot. I am making the code so our robot is remote controlled, but it seems to have some bugs within it. If any experienced programmers here could debug my code, that would be great. Also, if there are any other errors that could interfere with my intended purpose that would also be great. Here is the code I am working on so far to work with the VEXnet joystick:

#pragma config(Motor, port3, LeftMotor, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, RightMotor, tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
while(1 == 1)
motor[RightMotor] = vexRT[Ch2] / 2;
motor[LeftMotor] = vexRT[Ch3] / 2;

if(vexRT[Ch2] == 1)

motor[RightMotor] = 127; //* Moves Right Motor forward when right joystick is forward *//

if(vexRT[Ch2] == -1)

motor[RightMotor] = -127; //* Moves Right Motor backward when right joystick is backward *//

if(vexRT[Ch3] == 1)

motor[LeftMotor] = 127; //* Moves Left Motor forward when left joystick is forward *//

if(vexRT[Ch3] == -1)

motor[LeftMotor] = -127; //* Moves Left Motor backward when left joystick is backward *//


I hope you can understand the intended purpose with the comments I added to each part so please fix them if it is wrong. This is my first time programming with this program and I would appreciate all the help! :D

I will be posting updates and pictures as the robot progresses. Thanks!

Tue Jan 27, 2015 10:29 pm
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 256
Post Re: First VEX Robot
I believe for what you're trying to do, you just need the first two lines in your while (1 == 1) loop, namely
motor[RightMotor] = vexRT[Ch2] / 2;
motor[LeftMotor] = vexRT[Ch3] / 2;

All the stuff below that doesn't really do anything for you...

FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at

Wed Jan 28, 2015 12:32 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.