|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
this helped me soooo much. thank you all. this is our second yr competing and this is my first year in FIRST. i have a java background and a simple C background from 8th grade...but it was so long ago.
I'm the only one in charge of programming so when i was handed all these Cd's and codes and links and websites, i was pretty overwhelmed. i just learned about this today and I've spend the majority of the day looking through posts to answer my Q's is there anyone here that i can directly e-mail or talk to if i have questions? (warning: I'm like a pet, i demand a lot of attn: i have questions everyday....or close to it) also, everyone speaks about a "dongle" and i saw the picture and everything. but what exactly IS it? ![]() |
|
#2
|
|||||
|
|||||
|
Re: Programming - Getting Started
Quote:
Teams are permitted to connect to four specific pins on the Competition Port, in order to 1) enable additional frequencies for practicing with multiple robots, 2) activate autonomous mode for testing, and 3) disable the robot. Most teams build a box with two or three switches that connects to the port. That box is called a dongle. The Competition Port Pinout Guide shows how to construct one. |
|
#3
|
|||||
|
|||||
|
Re: Programming - Getting Started
Here's an updated version for this year with 2005 links included.
Programming Quick Start
v FRC (Full-size Robot Controller) RC Default Code
v C Programming Resource Library http://www.usfirst.org/robotics/C_help.htm has a great overview of the programming process.
v c18_getting_started_2.4.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_C18_Getting_Started_51295d.pdf
Last edited by Mark McLeod : 27-01-2005 at 12:29. |
|
#4
|
|||
|
|||
|
Re: Programming - Getting Started
*waves hand* hi... I'm another of the newbies with little (read, none) experience working with C. I am also the only one on my team doing the programming dance. At the moment I'm teaching myself from whatever tutorials I can find, but if anyone can spare a moment or ten through e-mail or IM to answer my questions, I would be muchly indebted to you.
AIM- daemonlvr856 e-mail- krystal_dragon9@yahoo.com THANK YOU!!! ~kat |
|
#5
|
|||
|
|||
|
I'm another newbie, with probably less experience than the other two and just as hopeful maybe someone could give me some time cause i'm running into problems i don't know how to solve. Any help is welcome via im or e-mail or anything.
Team 695 |
|
#6
|
|||
|
|||
|
Re: Programming - Getting Started
I have another one i forgot about, when I try to build the error is that it can't locate the build tool, any insight?
|
|
#7
|
|||||
|
|||||
|
Re: Programming - Getting Started
I really am a newbie. Heres proof. Can I call the function Limit_Mix as it exists in the v2.4 code from the autonomous mode section of user_routines_fast.c? I was under the impression that I can, but when I just tried to compile it gave me warnings about no function prototype (whatever that is
), but it seems to have compiled anyway. Anyone? |
|
#8
|
||||
|
||||
|
Re: Programming - Getting Started
can anyone help me out with programming the buttons on the joy sticks`
|
|
#9
|
|||||
|
|||||
|
Re: Programming - Getting Started
Quote:
For Joystick Port 1:
p2_sw_top would be on joystick Port 2, p3_sw_top on Port 3, etc. They are used in your code like this: Code:
if (p2_sw_top == 1)
printf("Hello FIRST\r");
else
printf("Goodbye cruel world\r");
Last edited by Mark McLeod : 20-02-2005 at 01:59. |
|
#10
|
|||
|
|||
|
Quote:
Now, why do you say use a switch you may wonder? And why use a normally off/open switch? If your robot goes on an evil plot to kill you and you start to run away, you will let go of the switch, and the robot won't do autonomous anymore. OK, newcomers, there are a few tips that I myself have: 1. Programming takes time. If it doesn't work correctly/compile on the first attempt, and you can't figure out what is wrong, Save the file, close out MPLAB, and go do something for an hour then come back. It will probably hit you then. 2. Pay attention to the default code. It is your friend. It will tell you just about absolutely everything you need to know to program the robot. 3. Autonomous mode is not hard, you just need to think about it. Remember, there is a 40ms clock in the RC, so 1 second = 26.2ms. This would be a good time for a calculator. 4. NEVER DELETE OLD CODE. 5. Always put new code, even if you're only changing a comment, in a new folder. SAVE AN ENTIRE SEPARATE COPY! 6. NEVER DELETE OLD CODE. Those should be your ground rules. Enjoy ![]() Last edited by RIgnazio : 23-09-2005 at 10:15. Reason: 40ms is wrong, it should be 26.2ms |
|
#11
|
||||
|
||||
|
Re: Programming - Getting Started
Quote:
Quote:
I'm not sure where you got 40ms, but my memory is bad, and I remember two loops running in the RC, perhaps you're referring to a separate one than I am. |
|
#12
|
|||
|
|||
|
Re: Programming - Getting Started
>> 3. Autonomous mode is not hard, you just need to think about it. Remember, there is a 40ms clock in the RC, so 1 second = 26.2ms. This would be a good time for a calculator.
Maybe it should read 40MHZ clock in the RC. There is a 26.2ms sample time in the outer/main loop where you get new input from the operator station so in 1 second that is 40hz, i.e. 40 samples per second (actually is 28.167...hz, but 40hz is probably close enough)? Not really sure what the intent was, I'm having trouble parsing the line. Bud |
|
#13
|
||||
|
||||
|
Re: Programming - Getting Started
who knows which files are allowed to be transferred to the bot. ie <stdio.c>
|
|
#14
|
|||||
|
|||||
|
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 Last edited by Mark McLeod : 18-10-2005 at 11:27. |
|
#15
|
||||
|
||||
|
Re: Programming - Getting Started
thanx
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |