Go to Post Honestly I'm looking forward to just seeing all my friends again, that's what FIRST is really about to me. - Barry Bonzack [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 06-01-2005, 23:23
themaxim themaxim is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Jan 2005
Location: New York
Posts: 4
themaxim can only hope to improve
Programming Code

I have red the poll about your most popular programming code. and im sorry for being naive on the topic because I'm new, but what is the standard code for programming the robots? I'm new to programming, and I want to start of learning the basics of the widely-acepted "standard" code. Any suggestions?
  #2   Spotlight this post!  
Unread 06-01-2005, 23:25
Goobergunch Goobergunch is offline
Registered User
FRC #1168 (Malvern Robotics)
Team Role: Alumni
 
Join Date: Mar 2004
Rookie Year: 2004
Location: Paoli, PA
Posts: 246
Goobergunch is a name known to allGoobergunch is a name known to allGoobergunch is a name known to allGoobergunch is a name known to allGoobergunch is a name known to allGoobergunch is a name known to all
Re: Programming Code

In 2004, the robots were programmed in C. I doubt that this will change for this year.
  #3   Spotlight this post!  
Unread 06-01-2005, 23:25
sburro's Avatar
sburro sburro is offline
Registered User
AKA: Joe
FRC #0663 (crusaders)
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2002
Location: LOWELL
Posts: 129
sburro will become famous soon enoughsburro will become famous soon enough
Send a message via AIM to sburro
Re: Programming Code

Quote:
Originally Posted by themaxim
I have red the poll about your most popular programming code. and im sorry for being naive on the topic because I'm new, but what is the standard code for programming the robots? I'm new to programming, and I want to start of learning the basics of the widely-acepted "standard" code. Any suggestions?
The language on the first robot is c. This is a "scaled down" version of c++. If it is strictly an intrest in First, then C is the way to go. You can not program the controller in any other language.
  #4   Spotlight this post!  
Unread 06-01-2005, 23:27
sburro's Avatar
sburro sburro is offline
Registered User
AKA: Joe
FRC #0663 (crusaders)
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2002
Location: LOWELL
Posts: 129
sburro will become famous soon enoughsburro will become famous soon enough
Send a message via AIM to sburro
Re: Programming Code

Quote:
Originally Posted by Goobergunch
In 2004, the robots were programmed in C. I doubt that this will change for this year.
If First were to change the language, I think they would have warned us like they did last year.
  #5   Spotlight this post!  
Unread 06-01-2005, 23:28
themaxim themaxim is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Jan 2005
Location: New York
Posts: 4
themaxim can only hope to improve
Re: Programming Code

if i learned c++ instead... would i still be able to know c? or are they two just way totaly different things? what are the benefits/downsides of c/c++?
  #6   Spotlight this post!  
Unread 06-01-2005, 23:33
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
Re: Programming Code

Quote:
Originally Posted by sburro
The language on the first robot is c. This is a "scaled down" version of c++. If it is strictly an intrest in First, then C is the way to go. You can not program the controller in any other language.
WARNING: NERD PEDANTRY AHEAD

C is not a scaled down version of C++. C++ is an object oriented version of C, along with a few other differences. You can most certainly program the robot in another language, and in fact the default code does: it's sprinkled with assembler. The Microchip compiler adheres to the C18 standard, which is a stripped down version of C.

While C is definately the best way to go for FIRST, many other compilers have been written for PICS, but C is the second most common language used on PICs in "the real world". Most PIC applications I've seen are done in straight assembler.
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #7   Spotlight this post!  
Unread 06-01-2005, 23:48
vtrehan's Avatar
vtrehan vtrehan is offline
Mentor - Controls & Programming
AKA: Vivek Trehan
FRC #1241 (Theory6)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Mississauga, ON
Posts: 38
vtrehan is on a distinguished road
Send a message via Yahoo to vtrehan
Re: Programming Code

Quote:
Originally Posted by themaxim
if i learned c++ instead... would i still be able to know c? or are they two just way totaly different things? what are the benefits/downsides of c/c++?
Of course, but i would suggest learning C first, the reasons being:

1. C is easier and simpler to work with.
2. C can be compiled with any compiler, including C++ compilers, whereas C++ can not be compiled in MPLAB, the compiler we are supposed to be using.
3. C is low level programming, meaning we can work directly with register values and do binary programming used widely in engineering type programming, which is what we are supposed to do. But C++ is a high level language mainly used to do programming for businesses.


C is really simple to use and their is a tonne of tutorials present for it, but if you need any specific help, PM me and ill do my best to help you out.


Best wishes
Vivek.
__________________
2006-GM Industrial Design Award - Greater Toronto Super Regional
2006-Engineering Inspiration Award - Arizona Regional
2006-Regional Finalist - Arizona Regional

2005-Best Defensive Robot - Wonderland Off-Season
2005-Regional Chairman's Winners - Greater Toronto Regional
2005-Regional Champions - Waterloo (Thanks 68 and 1305)
2005-Best Website - Greater Toronto Regional
2005-Team Spirit Award - Waterloo
2005-Entreprenuership Award - Waterloo

2004-Rookie All-Star award - Great Lakes Regional
2004-Rookie Highest Seed - Greater Toronto Regional
2004-Rookie All-Star award - Greater Toronto Regional
2004-Team Spirit award - Greater Toronto Regional
2004-Team Spirit award - National Championship


  #8   Spotlight this post!  
Unread 07-01-2005, 11:54
BrianJennings BrianJennings is offline
Sleep is optional
None #1519 (Mechanical Mayhem)
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Merrimack
Posts: 24
BrianJennings is an unknown quantity at this point
Send a message via AIM to BrianJennings
Re: Programming Code

From my understanding c and c++ are extremly similar. I think the only different between them is some code and added features to c++. So you could think of C++ as C. but ++...(AKA stuff added to it)
__________________
"it's googleable " -- the_undefined
  #9   Spotlight this post!  
Unread 07-01-2005, 12:34
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,681
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Programming Code

Quote:
Originally Posted by vtrehan
3. C is low level programming, meaning we can work directly with register values and do binary programming used widely in engineering type programming, which is what we are supposed to do. But C++ is a high level language mainly used to do programming for businesses.
WARNING: Even more nerd pendantry

C is not a low level language. It's a high level language, just like C++. C++ just has more abstraction incorporated in it, so it's a higher level language than C, but still. Low level languages are languages like assembler where you're actually working with registers and basic processor instructions full time. If you're defining variables and stuff, it's not really a low level language.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #10   Spotlight this post!  
Unread 07-01-2005, 12:59
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming Code

Quote:
Originally Posted by Kevin Sevcik
WARNING: Even more nerd pendantry

C is not a low level language. It's a high level language, just like C++. C++ just has more abstraction incorporated in it, so it's a higher level language than C, but still. Low level languages are languages like assembler where you're actually working with registers and basic processor instructions full time. If you're defining variables and stuff, it's not really a low level language.
I've always considered C to be sort of an "intermediate" level language. It started out with an awful lot of direct mapping of its features to the hardware on which the program runs. When the native register size of the CPU is a native variable type in the language, I don't think it's a very high level language at all. You're not working with the basic processor instructions themselves, but almost everything you do is directly related to those instructions, and using pointers is essentially right down there in the computer's RAM with little if any abstraction.
  #11   Spotlight this post!  
Unread 07-01-2005, 13:07
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: Programming Code

Quote:
Originally Posted by vtrehan
...
1. C is easier and simpler to work with.
2. C can be compiled with any compiler, including C++ compilers, whereas C++ can not be compiled in MPLAB, the compiler we are supposed to be using.
3. C is low level programming, meaning we can work directly with register values and do binary programming used widely in engineering type programming, which is what we are supposed to do. But C++ is a high level language mainly used to do programming for businesses...
I'd like to correct a few things here.

1: C isn't "easier" or "simpler" for everyone. It really depends on how you learn, and whatnot. I find C++ to be a lot "easier" and "simpler", and I also find C to be the complete opposite. Like I said, it just depends on how you learn, and also your preferences to boot.

2: Most points made in #2 are correct, except that MPLAB is just an IDE (Integrated [sp?] Developement Eviroment). The compiler we're using is called CBOT. MPLAB just makes the coding easier.

3: C and C++ are both low level. C++ can do pretty much the same thing as C, and plus some (as far as I know). C isn't all that much low-level though. Is C low-level? Pretty much. Is C++? Pretty much. Anything done in C can be done in C++ (as you've said), so to say that C++ is a low-level language is kind of a lie.

If anyone would like to correct me on any points I've said and am wrong, please do so. My apologizes also for going off-topic, but I thought I should clarify some misconceptions that was said in the quoted post.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
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
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
Sourceforge for Code Repository and other stuff SilverStar Programming 9 15-01-2005 21:16
A Centralized Code Dump? colt527 Programming 29 01-01-2005 16:07
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Programming code Fix FRC Ferazel2001 Programming 6 08-02-2004 02:46


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

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


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