Im having some trouble with the program.
#pragma config(Hubs, S1, HTMotor, HTServo, HTMotor, none)
#pragma config(Motor, motorD, left_motor, tmotorNormal, openLoop, )
#pragma config(Motor, motorE, right_motor, tmotorNormal, openLoop, )#pragma config(Motor, motorE, Arm_Motor, tmotorNormal, openLoop, )
#pragma config(Servo, servo1, serv1, tServoNormal)
#pragma config(Servo, servo2, serv2, tServoNormal)
#pragma config(Servo, servo3, serv3, tServoNormal)
#pragma config(Servo, servo4, serv4, tServoNormal)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#include "JoystickDriver.c" //Include file to "handle" the BT messages.
task main()
{
while (true) //Loop forever
{
getJoystickSettings(joystick); //You had two of those
motor[left_motor] = joystick.joy1_y2;
motor[right_motor] = joystick.joy1_y1;
if(joy1Btn(1))
{
servoTarget[servo1] = 250;
}
else
{
servoTarget[servo1] = 0;
}
if(joy1Btn(5))// before it was !=0 but it isn't needed
{
servoTarget[servo2] = 0;
servoTarget[servo3] = 150;
}
else
{
servoTarget[servo2] = 200;
servoTarget[servo3] = 0;
}
if(joy1Btn(1))
{
servoTarget[servo4] = 0;
}
else
{
servoTarget[servo4] = 250;
}
if(joy2Btn(6))
{
nMotorEncoder[Arm_Motor] = 0;
nMotorEncoderTarget[Arm_Motor] = 20;
motor[motorF] = 50;
}
else if(joy2Btn(8))
{
nMotorEncoder[Arm_Motor] = 0;
nMotorEncoderTarget[Arm_Motor] = -20;
motor[motorF] = -50;
}
else
{
motor[Arm_Motor] = 0;
}
}
}
----------------------------------------------------------------------------------------------------------------------
**Error**:Undefined variable 'left_motor'. 'short' assumed.
**Error**:Undefined variable 'right_motor'. 'short' assumed.
**Error**:Undefined variable 'Arm_Motor'. 'short' assumed.
**Error**:Undefined variable 'motorF'. 'short' assumed.
Also the debugger window doesnt work.
Thanks
