Go to Post Maybe FIRST made these bumper rules so IRI would have something to blow off come July. - Koko Ed [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 Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
  #31   Spotlight this post!  
Unread 30-09-2005, 17:37
Budster Budster is offline
Registered User
#1073
Team Role: Mentor
 
Join Date: Jan 2005
Location: Hollis-Brookline, NH
Posts: 4
Budster is an unknown quantity at this point
Re: Programming - Getting Started

I had some students that had the fundamentals of C and how to program it. They could build "hello world" programs with ease. But they quickly got lost when trying to implement the hardware control logic in C to use sensors or manipulate motors/actuators/etc.

In my first year as rookie mentor, what I found the hardest was that I spent 80% of my time trying to figure out how the hardware worked and how to program it to work effeciently. I spent 1% of my time helping write and debug C code and 19% of my time trying to figure out what the pecular limitations of the C implementations were and why sometimes the compiler generated some "unusual" and long/complex sequences of assembler.

I've been trying to put together a presentation on programming the hardware with examples to help out - but it quickly gets overwhelming and I have to start again.

Although you do have to start by learning the C language and how to construct programs... understanding which bits to twiddle and when to do so to control things seemed to take a lot more of the time than ramping up on C. In this respect the PIC18C and PIC18F manuals became my bed time reading for most of last year.

I am planning on spending some time this year teaching how to read hardware specifications to help students decipher some things on their own.

Bud
  #32   Spotlight this post!  
Unread 30-09-2005, 18:09
CJO's Avatar
CJO CJO is offline
Emeritus Pain in the $@#$@#$@#
AKA: Christopher J. O'Connell
None #1097 (Site 3 Engineering)
Team Role: Alumni
 
Join Date: Feb 2003
Location: Latrobe (over the rainbow), CA
Posts: 217
CJO will become famous soon enoughCJO will become famous soon enough
Re: Programming - Getting Started

I think that it is really important to use some kind of content management (even if you are by yourself) because it allows you to roll back to previous versions. CVSDude offers free subversion/CVS accounts to non-profit organizaitons, and is very reliable.

Doing this can save you a lot of time by simply rolling back to an earlier version, and can even allow simultaneous development of different ideas (branches).
__________________
Team 1097 -- Site 3 Engineering
~~~~~~~~~~~~~~~~~~~~
2003 Sacramento Rookie All Star
2003 Silicon Valley Rookie All Star
2004 Sacramento Engineering Inspiration Award
2004 Sacramento Visualization Award
2004 Outstanding Volunteer Award (G. Glasser)
2004 Silicon Valley Sportsmanship Award
2004 National Visualization Runner Up
2004 Cal Games Finalist
2005 Sacramento Sportsmanship Award
2005 Sacramento #1 seed
2005 Sacramento Finalist

2005 Silicon Valley Sportsmanship Award
2005 Silicon Valley #1 Seed
2005 Silicon Valley Finalist

  #33   Spotlight this post!  
Unread 18-10-2005, 07:23
mallot1243's Avatar
mallot1243 mallot1243 is offline
Registered User
FRC #1243
 
Join Date: Apr 2004
Rookie Year: 2004
Location: Swartz Creek, MI
Posts: 27
mallot1243 is an unknown quantity at this point
Re: Programming - Getting Started

who knows which files are allowed to be transferred to the bot. ie <stdio.c>
  #34   Spotlight this post!  
Unread 18-10-2005, 10:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,712
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming - Getting Started

Quote:
Originally Posted by mallot1243
who knows which files are allowed to be transferred to the bot. ie <stdio.c>
You are allowed to use any files in your project you like, even write your own as long as you include the ifi required libraries and supporting include files.

However, be aware that the PIC is limited in it's capabilities and will not support or fully support the functions you may want to use in a typical stdio.c file. You can't just drag one in from a PC and expect it to work. You can check the documentation (C:\mcc18\doc) to see what is supported by the C18 compiler.
The document that might interest you for the C18 v2.4 compiler is at:
http://ww1.microchip.com/downloads/e...Lib_51297d.pdf
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 18-10-2005 at 11:27.
  #35   Spotlight this post!  
Unread 19-10-2005, 12:07
mallot1243's Avatar
mallot1243 mallot1243 is offline
Registered User
FRC #1243
 
Join Date: Apr 2004
Rookie Year: 2004
Location: Swartz Creek, MI
Posts: 27
mallot1243 is an unknown quantity at this point
Re: Programming - Getting Started

thanx
  #36   Spotlight this post!  
Unread 11-11-2005, 15:55
Joohoo's Avatar
Joohoo Joohoo is offline
Registered User
FRC #0340 (G.R.R.)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Rochester
Posts: 241
Joohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really nice
Send a message via AIM to Joohoo Send a message via Yahoo to Joohoo
Re: Programming - Getting Started

Right now I am one of two programmers on my team and we both can't figure this out(we're both rookies). We can write the code for the autonomous mode, build it, and transfer it, but how do we tell the FRC to execute the autonomous coding?? We copied everything and tried to mess around with Main.c but is there any less hazardous way to go about it??
  #37   Spotlight this post!  
Unread 11-11-2005, 16:08
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,269
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
To JooHoo

JooHoo I got your private message but got errors when i tryed to send you one, it said you had selected not to recieve private messages. You should be able to fix this in the User CP.

I hope this answers your question.

To run your autonomous code you need to build a mock competition port (a couple of switches that attach to the competition port to allow you to use autonomous and to disable the robot.) You need a 15 pin serial adapter (i dont know if that id the right name but it is the thing that plugs into a serial port.)

The pinout diagram for the port can be found at http://ifirobotics.com/docs/competit...guide-reva.pdf

It is easy to make one (it took me about 10 minutes) and will make your programming much easier. Last season we didnt make one and that ment i couldn't teas my autonomous until a practice meet 2 days before ship. We mad one between our regional and the off season competitions and I was able to write 5 succesful autonomous codes in one day. It will save you alot of late build season stress.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
  #38   Spotlight this post!  
Unread 11-11-2005, 16:20
Madison's Avatar
Madison Madison is offline
Dancing through life...
FRC #0488 (Xbot)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Seattle, WA
Posts: 5,243
Madison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond repute
Re: To JooHoo

I can find no member named JooHoo. Are you certain you tried to send your PM to the correct person?

Brandon, could this be an account that was recently deleted or suspended?
__________________
--Madison--

...down at the Ozdust!

Like a grand and miraculous spaceship, our planet has sailed through the universe of time. And for a brief moment, we have been among its many passengers.
  #39   Spotlight this post!  
Unread 11-11-2005, 16:35
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,712
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: To JooHoo

Joohoo aka http://www.chiefdelphi.com/forums/me...p?userid=11578 is an actual person
He has email enabled but not PM in his user profile.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-11-2005 at 17:40.
  #40   Spotlight this post!  
Unread 11-11-2005, 16:45
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,712
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming - Getting Started

Quote:
Originally Posted by Joohoo
... how do we tell the FRC to execute the autonomous coding?? We copied everything and tried to mess around with Main.c but is there any less hazardous way to go about it??
Yes, there are more ways than you can shake a stick at

One is to build a competition port dongle that allows you to flip a switch and the code in main.c will react the same as in competition. There are lots of references to them in this thread and James Brown pointed you to the pinout diagram in another more personalized thread post (his post is here now). In the long run a dongle is a very important device to have as it also provides you with a DISABLE switch that overrides all autonomous programming errors!

Another is to simply pick a switch of your own, such as an unused button on a joystick and have the code in main.c set the autonomous bit as long as it sees that button pressed. There are lots of variations on this and it's certainly safer than hardcoding it within main.c. Use your imagination. Just remember to remove it from your competition code unless you come up with an interesting autonomous move that's useful in the middle of this year's game.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-11-2005 at 17:36.
  #41   Spotlight this post!  
Unread 11-11-2005, 17:04
Madison's Avatar
Madison Madison is offline
Dancing through life...
FRC #0488 (Xbot)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Seattle, WA
Posts: 5,243
Madison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond repute
Re: To JooHoo

Quote:
Originally Posted by Mark McLeod
Joohoo is an actual person
He has email enabled but not PM in his user profile.
Okay, so I must be delirious. I checked the member list alphabetically and didn't see JooHoo anywhere -- see the attached screenshot

I looked at his profile and searched by his real name and didn't find that, either.

I'm sick, so it's entirely plausible that I'm also crazy, but I think I'm just overlooking something stupid here.
Attached Thumbnails
Click image for larger version

Name:	nojoohoo.jpg
Views:	195
Size:	15.7 KB
ID:	3670  
__________________
--Madison--

...down at the Ozdust!

Like a grand and miraculous spaceship, our planet has sailed through the universe of time. And for a brief moment, we have been among its many passengers.
  #42   Spotlight this post!  
Unread 11-11-2005, 17:46
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,712
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: To JooHoo

Quote:
Originally Posted by M. Krass
Okay, so I must be delirious. I checked the member list alphabetically and didn't see JooHoo anywhere --
That's really interesting! He doesn't showup for me in the member search or list either. Only when I go directly to his userid. I wonder if "Invisible mode" has that effect?
He's a ghost of ChiefDelphi. We can only see him when he posts something.

P.S. Thought you'd be interested. 810 Smithtown isn't registered this year. The team is still around and was in a recent parade, but the school budget went down and they're on an austerity budget.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-11-2005 at 18:01.
  #43   Spotlight this post!  
Unread 11-11-2005, 18:12
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,713
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: To JooHoo

Quote:
Originally Posted by Mark McLeod
That's really interesting! He doesn't showup for me in the member search or list either. Only when I go directly to his userid. I wonder if "Invisible mode" has that effect?
Same here. And invisible mode has no effect on viewing in the members list. There may be a way to change something like that, but I can't find it in the user cp options.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #44   Spotlight this post!  
Unread 09-01-2006, 18:22
brianoconnor2f2 brianoconnor2f2 is offline
Registered User
FRC #1132
 
Join Date: Jan 2006
Location: Fredericksburg, VA
Posts: 2
brianoconnor2f2 is an unknown quantity at this point
Re: Programming - Getting Started

Hey Thanks fellas This is my first year and I'm a programmer and am used to C++, C isnt much different but I still need all the help I can get. Thanks.

-Matt
  #45   Spotlight this post!  
Unread 15-01-2006, 20:26
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,712
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
2006 Programming - Getting Started

2006 Programming Quick Start

1. Beginners need the following to program the FIRST robot:
  • FRC (Full-size Robot Controller) RC Default Code
  • Microchip MPLAB & C compiler or intelitek Easy C
  • IFI_Loader
  • A standard serial cable
  • A Windows PC with a serial port or USB-to-serial converter
2. Where to get everything:
  • The Camera default code for use with the CMUCam2 camera is available at the developer Kevin Watson’s website. While there you’ll also find code examples for using other benefical sensors. This default code may have the normal driving mode disabled.
  • MPLAB is the FIRST supplied Windows based development environment (edit, compile, debug) that runs on your desktop computer and comes in the Kit-of-Parts wrapped inside the MPLAB notepad. Manuals for using MPLAB come on the CD and are also found on-line at the Microchip website.
  • IFI_Loader v1.0.12 (also on the KOP CD) is used to download the compiled code into the RC via a serial cable from your desktop or laptop computer.
  • EasyC from Intellitek can be used instead of MPLAB or as a rapid prototyping tool. The Main Contact of each team received an email from FIRST on 1/10/06 with directions on downloading the software.
3. National Instruments Labview came in the kit-of-parts, but you need the very useful special applications for the camera and OI dashboard that have been provided in this Chiefdelphi thread.

4. Check the IFI website periodically for updates to the software that corrects issues and fixes problems. For instance, new Master Controller “patches” if any, will be made available there. Directions will be included with any download.

5. The programming language used is “C” or PIC assembly. Tutorials in C can be found on the web, in your local bookstore or on the FIRST website, e.g.,
  • C Programming Resource Library has a great overview of the programming process.
  • Learn C Programming - Developed by Carnegie Mellon and the National Robotics Engineering Consortium specifically for FIRST, this interactive website will get your team prepared for the FIRST Robotics Competition.
6. Newer laptops no longer come with the serial port required to download code to the Robot Controller. If you have this problem one solution is to use a USB/Serial converter. Various models are available at Radio Shack, CompUSA, or online, however, some models can be temperamental and they generally take longer to download than a built-in serial port (60sec vs 10 sec). Good results have been reported using: Bafo Technologies BF-810 (~$15) and a Radio Shack USB-to-Serial port cable #26-183 ($42). You can also use the converter that comes with the Radio Shack Vex Programming Kit.

7. Documentation is your friend. Take the time to at least leaf through each manual, so you have an idea of where information can be found. Most of the basic information beginners require can be found in the IFI documents or MPLAB documents available from the websites:
  • The 2005 IFI Control System Overview version applies to 2006 as well.
  • 2005 IFI Programming Reference Guide – basic how to hookup, program and download to the RC, hookup switches and sensors and do normal robot operations.
  • Useful programming and compiler documents come on the Kit provided MPLAB CBOT CD with the tool installations or are available from either Kevin Watson’s website or the legacy section of the Microchip website.
    1. c18_getting_started_2.4.pdf
    2. c18_libraries_2.4.pdf – details on timers, interrupts, and various other utility functions available to the programmer.
    3. c18_users_guide_2.4.pdf - table of max numbers each variable type will store, compiler options, error messages, detailed descriptions of pragmas and some other advanced topics.
    4. 2004/2005 RC Microchip pic18f8520 data sheet - PIC assembly instruction set and details on EEPROM and other chip specific topics. Mistakes in the datasheet.
    5. 2006 RC PIC18F8722datasheet and Errata.
    6. Microchip PICmicro 18C MCU Family Reference Manual – all things great and small (in excruciating detail) about the processors we use.
    7. MPLAB Quick Start Guide.pdf - basic how to use MPLAB and set options.
    8. MPLAB Users Guide.pdf
8. For the CMUCam2 sensor delivered in the Kit-Of-Parts (KOP):
  • Use the special Labview Calibration application mentioned here. to focus and test the camera.
  • Use Kevin Watson’s camera baseline program and his collection of camera documentation, but remember it only solves the headache of working the camera for you it doesn’t drive your robot.
Visit the ChiefDelphi Programming forum for discussions on all programming topics, problems, issues, and ideas.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-01-2006 at 08:41.
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
Book on C programming - suggestions? wun Programming 18 14-01-2005 00:12
Help needed for getting started! chantilly_team Programming 4 27-10-2004 08:29
Autonomous Programming Competition Signup List SilverStar Programming 36 13-05-2004 15:09
Robot Programming Education phrontist Programming 11 03-05-2004 07:32


All times are GMT -5. The time now is 11:19.

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