View unanswered posts | View active topics It is currently Sun Sep 20, 2020 1:38 am

Reply to topic  [ 2 posts ] 
#include help..? 
Author Message

Joined: Tue Jan 27, 2015 10:49 pm
Posts: 1
Post #include help..?
I wrote a header file 'Encoders.h' with two methods 'driveDistance(float cm, float speed)' and 'turnRight(float degrees, float speed)'.

I did the #include thing in my autonomous program:

#pragma config(Hubs, S1, HTMotor, HTMotor, HTMotor, HTServo)
#pragma config(Motor, mtr_S1_C1_1, rightMotor, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C1_2, leftMotor, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C2_1, rightLift, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C2_2, leftLift, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C3_1, motorH, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C3_2, motorI, tmotorTetrix, openLoop)
#pragma config(Servo, srvo_S1_C4_1, liftLeft, tServoContinuousRotation)
#pragma config(Servo, srvo_S1_C4_2, liftRight, tServoContinuousRotation)
#pragma config(Servo, srvo_S1_C4_3, hookLeft, tServoStandard)
#pragma config(Servo, srvo_S1_C4_4, hookRight, tServoContinuousRotation)
#pragma config(Servo, srvo_S1_C4_5, servo5, tServoNone)
#pragma config(Servo, srvo_S1_C4_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

#include "JoystickDriver.c" //Include file to "handle" the Bluetooth messages.
#include "Encoders.h"

void initializeRobot()
task main()

waitForStart(); // Wait for the beginning of autonomous phase.

driveDistance(12, 50);

turnRight(90, 12);

while (true)

and this is my error:
**Severe*:Couldn't open '#include' file 'Encoders.h'
**Error**:Undefined procedure 'driveDistance'.
**Error**:Undefined procedure 'turnRight'.

What did I do wrong??

Tue Jan 27, 2015 10:58 pm
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 256
Post Re: #include help..?
Where is the header file? Is it in the same directory as your program? If not, then ROBOTC won't know where to find it to include it.

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:30 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 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:  

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