View unanswered posts | View active topics It is currently Sat Aug 23, 2014 8:24 am






Reply to topic  [ 3 posts ] 
not allowing to do #pragma config(Motor, motorB, mtr_S1_C1_1 
Author Message
Rookie

Joined: Fri Jul 03, 2009 11:32 pm
Posts: 1
Post not allowing to do #pragma config(Motor, motorB, mtr_S1_C1_1
I am just starting programming using robotc and am not sure how exactly to make robotc read the tetrix motors

when i put in this

#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, motorA, mtr_S1_C1_1, tmotorNormal, PIDControl, )
#pragma config(Motor, motorB, mtr_S1_C1_2, tmotorNormal, PIDControl, )

it says error, variable 'mtr_S1_C1_1' redefinition and same with mtr_S1_C1_2

please help, I am really confused :breakcomputer: and fairly frustrated


Sat Jul 04, 2009 12:26 am
Profile
Expert
User avatar

Joined: Tue Oct 14, 2008 7:16 pm
Posts: 171
Location: Investigating an unidentified ship sighted in Sector 31428
Post Re: not allowing to do #pragma config(Motor, motorB, mtr_S1_C1_1
Did you come up with those names, that is "mtr_S1_C1_1", because they are actually internal names used by RobotC, as are "motorA", "motorB", etc.; pick a different name and you should be good.

_________________
Captain, Head programmer, School of the Arts, Silverbots Robtics Team #2890
Code:
using namespace System;
using namespace Genius;
using namespace Personality;
public ref class Nerd : Geek, IAnserable
{
    Geek::Type brainMode = Geek::Type::Programmer;
}


Sat Jul 04, 2009 12:19 pm
Profile
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: not allowing to do #pragma config(Motor, motorB, mtr_S1_C1_1
You should not edit the #pragma statements yourself. Use the Motor and Sensor Setup wizard. You just tell it how you have your robot wired up and it will create the correct #pragmas for you.

_________________
Jeff McBride
Benson Robotics Club


Sat Jul 04, 2009 12:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.