I'm trying to run this simple program just to make my robot move forwards for 1 second using the forward command, figuring it would use ports 1 and 10 (main drive motors) because they are labeled as left and right drive. But when the command is ran it instead uses ports 2 and 3 for the claw movement. This is my project trying that.
#pragma config(Sensor, in1, LeftLineSensor, sensorLineFollower)
#pragma config(Sensor, in2, CenterLineSensor, sensorLineFollower)
#pragma config(Sensor, in3, RightLineSensor, sensorLineFollower)
#pragma config(Sensor, dgtl1, UltrasoundOut, sensorNone)
#pragma config(Sensor, dgtl2, UltrasoundIn, sensorNone)
#pragma config(Sensor, dgtl3, UpperLimitSwitch, sensorTouch)
#pragma config(Sensor, dgtl4, LowerLimitSwitch, sensorTouch)
#pragma config(Sensor, dgtl5, BumperSwitch, sensorTouch)
#pragma config(Sensor, dgtl6, ElbowEncoder, sensorQuadEncoder)
#pragma config(Sensor, dgtl8, ShoulderEncoder, sensorQuadEncoder)
#pragma config(Motor, port1, LeftDrive, tmotorVex393_HBridge, openLoop, reversed, driveLeft)
#pragma config(Motor, port2, Claw, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, Wrist, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, Elbow, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, Shoulder, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port10, RightDrive, tmotorVex393_HBridge, openLoop, reversed, driveRight)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
forward(50);
wait(1);
stop();
}
This is RobotC's method
#ifndef _FORWARD_H_GUARD
#define _FORWARD_H_GUARD
void forward(signed byte speed = 95)
{
motor[port2] = abs(speed);
motor[port3] = abs(speed);
}
#endif
I'm unsure how to fix this issue but I have gone into the RobotC method listings and found all the basic motor commands using ports 2 and 3 instead of 1 and 10, I've tried to change it to the right ports but got reverted multiple times. I understand I can manually make it go forwards but it would be nice to have the method.