Go to Post The real question is has anybody ever learned anything actionable from a game hint or red herring. - Joe Ross [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-28-2010, 07:53 PM
just_wondering just_wondering is offline
Newbie :)
FRC #3202 (Knightbots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: St. Paul
Posts: 14
just_wondering is an unknown quantity at this point
Unhappy Not Knowing Much About Programming

This is the year is the first year I have done FRC and my team is a rookie team. I know just about nothing about programming so my first question is: What are the differences between the different drives like tank and arcade?
  #2   Spotlight this post!  
Unread 01-28-2010, 08:02 PM
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Getting ready for the break
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,344
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Not Knowing Much About Programming

I can't give you a comprehensive answer, but...

Tank uses two joysticks - one for the left side wheels, one for the right side. Also known as skid steer. To turn, you push one joystick more than the other.

Arcade uses a single joystick. To turn, you push the joystick in the direction you want to turn.

Neither is "better" - it is purely driver preference.
__________________

I am N2IRZ - What's your callsign?
  #3   Spotlight this post!  
Unread 01-28-2010, 08:02 PM
Delian Delian is offline
Registered User
FRC #3006
 
Join Date: Dec 2008
Location: Salt Lake City
Posts: 16
Delian is on a distinguished road
Re: Not Knowing Much About Programming

Tank Drive Uses two joysticks, the y-axis of each joystick, i.e., up-down, directly maps to the two motor values.

Arcade Drive uses a single joystick. The value of one of the motors is the y-axis plus the x-axis, while the value of the other motor is the y-axis minus the x-axis. This makes it so that pushing forward on the joystick moves both forward, pushing to the left spins counter-clockwise, etc.

Any other questions?
  #4   Spotlight this post!  
Unread 01-28-2010, 08:19 PM
just_wondering just_wondering is offline
Newbie :)
FRC #3202 (Knightbots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: St. Paul
Posts: 14
just_wondering is an unknown quantity at this point
Re: Not Knowing Much About Programming

Thanks, and yes there are many more questions. What are global variables?
  #5   Spotlight this post!  
Unread 01-28-2010, 08:37 PM
Chris is me's Avatar
Chris is me Chris is me is offline
three on the scale
AKA: Pinecone
no team (formerly FRC 3929, 228, 2791)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Chicago, IL
Posts: 8,459
Chris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond repute
Re: Not Knowing Much About Programming

Note: Answer not FRC specific.

Global variables are variables defined and declared independent of any classes or functions. It's generally not considered good programming practice to extensively use them.
__________________
Looking for a new team in north Chicago / northwest suburbs
Mentor: 3929 (2018)
Mentor / Drive Coach: 228 (2016-17) - 2016 RIDE Winner &
Consultant: 2170 (2017)
College Mentor: 2791 (2010-15) Build Photos - 2013 WPI Finalists, 2012 BAE Finalists
Student: 1714 (2009) - 2009 MN 10K Lakes Winners
  #6   Spotlight this post!  
Unread 01-28-2010, 08:44 PM
just_wondering just_wondering is offline
Newbie :)
FRC #3202 (Knightbots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: St. Paul
Posts: 14
just_wondering is an unknown quantity at this point
Re: Not Knowing Much About Programming

sorry, but what are variables, I really know nothing
  #7   Spotlight this post!  
Unread 01-28-2010, 08:50 PM
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Not Knowing Much About Programming

Variables are containers for memory on a computer, they are associated with a name and data type (such as string, number, etc).

As Chris is me was saying about global variables, every variable has a "scope" which controls which part of your program can access other parts of the program.

A variable in program is the same concept as a variable in math such as "x^2 + 7x + 5 = 0" with x being the variable.

If you're using C++ for FRC programming I'd recommend reading http://www.cplusplus.com/doc/tutorial/ along with the FIRST manuals of course (control system manuals here, http://usfirst.org/roboticsprograms/....aspx?id=10934 and C++ manuals here, http://first.wpi.edu/FRC/frccupdates.html.

LabVIEW also has a great community over at http://decibel.ni.com/content/community/first
  #8   Spotlight this post!  
Unread 01-28-2010, 08:54 PM
Rizner's Avatar
Rizner Rizner is offline
Registered User
FRC #2425
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Florida
Posts: 75
Rizner has a spectacular aura aboutRizner has a spectacular aura about
Re: Not Knowing Much About Programming

Quote:
Originally Posted by just_wondering View Post
sorry, but what are variables, I really know nothing
variables are words that contain a value. If you have the following things:

Code:
int var1 = 5;

double var2 = 10.0;

string var3 = "hello";

char var4 = 'c';
each of those are a variable. Other variables exist and can be declared or created in the program. I haven't seen much of the code here, but I'm pretty sure Joysticks are created and named (as variables), motors, solenoids, etc are all created and named.

Basically, if you create a name for something that you can create or change values for, use in other equations or declarations, it's a variable. I would suggest looking at beginning programming tutorials for the language you decide to code in and working your way through it.
__________________
  #9   Spotlight this post!  
Unread 01-28-2010, 08:56 PM
just_wondering just_wondering is offline
Newbie :)
FRC #3202 (Knightbots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: St. Paul
Posts: 14
just_wondering is an unknown quantity at this point
Re: Not Knowing Much About Programming

Thanks you guys Finally fell like I might get somewhere.
  #10   Spotlight this post!  
Unread 01-28-2010, 09:00 PM
gloomy_lion's Avatar
gloomy_lion gloomy_lion is offline
Registered User
FRC #2199 (Robo-Lions)
Team Role: Webmaster
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Maryland
Posts: 10
gloomy_lion is an unknown quantity at this point
Re: Not Knowing Much About Programming

To answer your question, a variable is used to store data and input. There are different types of variables for storing different types of information. For example, a int variable -which stores whole numbers- cannot hold the values X or 2.56. Variables can be compared to each other using comparisons such as > or <.

If you want to learn more about programming, I'd recommend talking to the head of your programming subteam.
__________________
  #11   Spotlight this post!  
Unread 01-29-2010, 12:03 AM
Tom Line's Avatar
Tom Line Tom Line is offline
Don't lay blame. Fix probems.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 3,072
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Not Knowing Much About Programming

You may want to visit frcmastery.com

It's a great depository that has videos that will get you started programming in Labview and explain what many portions of the program do.
  #12   Spotlight this post!  
Unread 01-29-2010, 01:48 AM
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Not Knowing Much About Programming

Quote:
Originally Posted by just_wondering View Post
What are global variables?
It might help to know what NOT global variables are as well.
There are different degrees of 'global'-ness and it's generally more useful and precise to think in terms of the 'scope' of variables, rather than global or not.

Consider this simple C function

Code:
int foo (int x, int y){
    int z = x + y;
    return z;
}
Here 'z' is an integer variable.
It's both declared and assigned a value in the same line.
More importantly, because it's declared inside the body of a function, it is said to have 'function' scope
This essentially means that 'z' is a variable that is almost as unglobal as a variable can be (there exists even more restrictive scope, but ignore that fact for now).
No other function can use or change the value of the variable 'z'.
In fact, 'z' only even exists during the brief period that function 'foo' is executing.

Now look at a relatively more global variable, one that can be used by two or more functions.

Code:
int z;

void add1(void){
    z = z + 1;
}
void subtract1(void){
    z = z - 1;
}
Because 'z' is declared outside the body of any function, it is said to have (at least) file scope.
This 'z' can be accessed by any function that exists in the same source file.

It is also possible to make 'z' visible to functions in other source files, giving it what some call 'program' scope.

So, now that you have some idea what global means in the context of variables, google for "scope variables" and start becoming a programmer.
And have fun with it.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)

Last edited by gvarndell : 01-29-2010 at 01:54 AM.
  #13   Spotlight this post!  
Unread 01-29-2010, 06:39 PM
just_wondering just_wondering is offline
Newbie :)
FRC #3202 (Knightbots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: St. Paul
Posts: 14
just_wondering is an unknown quantity at this point
Re: Not Knowing Much About Programming

That makes so much sense, thank you!!!!! I get it!!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not too much activity here... Kevin Thorp 3D Animation and Competition 20 01-27-2009 09:02 PM
Scary event: Anyone know much about cars? Cody Carey Chit-Chat 8 12-05-2007 07:37 AM
Is there too much focus on starting new teams, and not enough on maintianing the old? Ashley Christine General Forum 21 11-03-2005 07:23 PM
pic: It does not take much to spoil a good hang CD47-Bot Extra Discussion 7 04-30-2004 04:30 PM
not much time left archiver General Forum 0 06-23-2002 09:18 PM


All times are GMT -5. The time now is 05:04 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi