View Single Post
  #12   Spotlight this post!  
Unread 19-03-2012, 22:09
Gondorf5 Gondorf5 is offline
Registered User
FRC #1691
 
Join Date: Feb 2012
Location: Sidney, MT
Posts: 7
Gondorf5 is an unknown quantity at this point
Re: Newbie Alert. Our robot is competing, and I can't program it.

Thanks for making that first part clear, rbmj; I wasn't sure whether or not the "myRobot();" constructor line of coding was a little confusing. It still is, but that was the one major question I can safely ask without getting to critical about your methods.

So granted that I know which joystick button goes with what button (I'm assuming that because I'm using a Logitech controller from the FTC and was using ROBOTC, the buttons should coincide with the same numeric value for C++ because C++ is a less user-friendly version of ROBOTC... I am really good at sounding like I know more than I know, I know. I know little.), I can use the command "joystick.GetRawButton(Button# here)" to tell the action motors to activate until the button is released, when which you use the "else" to command the motor to stop. Did I translate that correctly?

Also, a quick question about one of your earlier posts; when using the "Jaguar.set" command, do I use "my_jag.Set(value.0);", or "motorX.Set(value.0);"?

Of course, I would have to declare each motor that I plan on using under something like a void command (tell me when, where, and how I am wrong 'cause I know I'm bound to be somewhere), so motorX would be a motor that I've already declared and set aside to be the motor to suit that one purpose.

...I hope you understand at least half of this because I'm surprised to find that I don't.

Oh, and to answer your question, yes; I believe something like that should do the trick. If not, I know where to find you.

--Gondorf5--
Message to the forum visitors and those who've posted:

Big thanks to everyone who participates on this forum page! Tell your friends who want to learn the FRC C++ essentials. I'd like to try and make this a forum page where programmer-wannabe's for FIRST can come to learn without having to wade through chest-high waves of seemingly complicated terms like "void" and "Jaguar" and "semicolon," while at the same time teaching them what they need to know to end their robot's endless-eternal-yet-inaudible-screams-of-relentless-torment...
Reply With Quote