![]() |
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 |
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). |
Re: Programming - Getting Started
who knows which files are allowed to be transferred to the bot. ie <stdio.c>
|
Re: Programming - Getting Started
Quote:
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 |
Re: Programming - Getting Started
thanx
|
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?? :confused:
|
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. |
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? |
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. |
Re: Programming - Getting Started
Quote:
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.;) |
Re: To JooHoo
1 Attachment(s)
Quote:
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. |
Re: To JooHoo
Quote:
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. |
Re: To JooHoo
Quote:
|
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 |
2006 Programming - Getting Started
2006 Programming Quick Start
1. Beginners need the following to program the FIRST robot:
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.,
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:
|
| All times are GMT -5. The time now is 11:20. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi