Go to Post I live for the offseason...that is, when i'm not living for the actual season. - Libby K [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
  #16   Spotlight this post!  
Unread 13-01-2008, 02:10
SomeoneKnows SomeoneKnows is offline
SomeoneKnows
AKA: Vince Thompson
FRC #1752 (Team Tonka)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: KC Missouri
Posts: 19
SomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of light
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Quote:
Originally Posted by jratcliff View Post
Thanks for the replies. The main reason I am using the VEX is so that I can experiment programming a fully running robot at home while the high-school team still has a big pile of parts on the floor.
Yes much of the default code for FRC is usable with the Vex but there are a few differences. The Vex makes a great training platform. Are you using the Vex code found at this link http://www.vexlabs.com/vex-competiti...gramming.shtml for the Autonomous Files downloads?


Quote:
Originally Posted by jratcliff View Post
(2) Does his default framework have, out of the box, everything you need to drive a basic frame robot around or do you have to write all of that yourself?
Yes, the default code will allow you to use the controller to run under radio control but you'll want to make modifications for behavior using the joysticks and any autonomous programming.


Quote:
Originally Posted by jratcliff View Post
Where is the missing piece of documentation in all of this?
Quote:
Originally Posted by jratcliff View Post
CCP2CON = 0x3C;
PR2 = 0xF9;
CCPR2L = 0x7F;
T2CON = 0;
T2CONbits.TMR2ON = 1;
I found definitions to these variables in the header file: ifi_picdefs.h from a download off the VexLabs web site. The file was dated 1/14/2004. They were defined as extern so may be part of the master code which is undisclosed.

The only place I'm finding references to this is from FRC code that has been commented out with the explaination that it would generate a 40KHz PWM with a 50% duty cycle...

The documentation for FIRST MPLAB programming is scattered around the Internet. Be sure to check the FIRST web site's Documents and Updates Section http://www.usfirst.org/community/frc...nt.aspx?id=452 in Section 8 check the Additional Technical Resources link.

Check on the IFI Robotics web site under the Operator Interface documentation for tidbits on variables used http://www.ifirobotics.com/oi.shtml and the FRC Robot Controller page for documentation, FRC source code and supporting programs http://www.ifirobotics.com/rc.shtml.

I already mentioned the Vex Labs web site for Vex related versions.

Since you've found Chief Delphi you should check the white papers some have valuable programming information.

One last reference you may want to look at is the Microchip datasheets for the Vex's PIC18F8520 and the FRC controller's PIC 18F8722. If I have trouble finding the datasheets from official FIRST sources I get on www.digikey.com and enter the processor model number, select a processor, select the Technical/Catalog Information link to get a listing of the processors to find the datasheets. At 448 pages the PIC 18F8722 datasheet is not light reading.

I noticed you list the St. Louis area for your location, you might want to attend the local robotics club's monthly meeting next Saturday. They usually have members involved with FIRST. Their information is at www.robomo.com.

Starting to learn MPLAB programming within the 6 week build period is not an ideal situation, I learned that a couple of years ago. Having such a late start I would suggest that you give the EasyC Pro a chance. I'm not fond of their licensing scheme handicapping our programmers so I suggest our team members try programming with WPILib which is a library accessed within the MPLAB environment. Since EasyC seems to be using the WPILib you get the same functionality without the drag and drop GUI.

Quote:
Originally Posted by jratcliff View Post
Yep, that's me. Sorry to the Easy C fans but I'm definitely thrilled with MPLAB and will be using it as my primary development platform.
Its great you have a Vex and are excited about participating, me too. But, as a mentor I should caution you that FIRST is not about you its about the students. They need to be able to program on a level that they can understand. Kevin Watson's code helps make that possible for some but the WPILib and EasyC are the best fit for other students.

Vince
  #17   Spotlight this post!  
Unread 13-01-2008, 02:27
jratcliff jratcliff is offline
Registered User
no team
 
Join Date: Jan 2008
Location: Lake Saint Louis, Missouri, USA
Posts: 10
jratcliff will become famous soon enoughjratcliff will become famous soon enough
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Quote:
Originally Posted by Kevin Sevcik View Post
First, about open sourcing your code. Kevin Watson has asked that his code not be redistributed, so be mindful of that.

For control algorithms, etc, the most important one to understand is PID control, though practically speaking most FRC mechanisms only need P or PD control. These whitepapers should prove helpful for that.

The (not-so) brief summary for PID control is that it works like your cruise control works. You pick a set point (cruising speed). The PIC compares this setpoint to feedback it gets from the real world (speedometer). If they don't agree, the PIC applies a control signal in the appropriate direction to correct. In a cruise control, if your actual speed is too slow, it hits the gas. Too fast, it lets off the gas. The algorithm simply multiplies the error by a constant gain and sets the output to this, and you have Proportional control. The remaining terms don't apply directly to cruise control, buuuut... If you were climbing a mountain/left the tire chains on/were dragging a boat anchor, then your car would consistently have an error, since you have to apply SOME gas to over come this, and when you hit your set point, you're applying 0 gas. So you integrate the error as time goes on, multiply by a gain, and add this to your P term. The longer you're missing your set point, the bigger this term, and the more you correct. Integral control. Finally, there's Derivative control. You monitor how fast the error is changing, multiply by a gain, and add. The purpose here is to slow down a rapidly correcting system so that it doesn't overshoot its target.

And all that is covered in more detail with better examples in those white papers. Encoders are opto-electrical devices that you can use to determine the position or speed of a shaft, so you can use them for the feedback. You can also use potentiometers, inductive or ultrasound sensors, photo-resistors, or whatever else is appropriate for what you're interested in controlling.

Finally, to end my last long winded post of the night, I'd highly recommend reading up on state-machines as mentioned in this presentation. It's a highly useful technique for autonomous programming. Especially with the hybrid mode this year.
Thanks for an incredibly helpful post! Most of what I would post on my website would likely fit my main theme as 'snippets'. I define a snippet as a single self contained piece of source code with no external dependencies which 'does something useful'. I still have snippets I wrote 25 years ago that I keep in my bag of tricks today.

It sounds like I have about six weeks of documentation to read at this point with only four weeks left to completion!! It's clear to me now that FIRST does not really expect any robotics teams to build a robot from ground zero in six weeks; the learning curve simply to read documentation is quite steep even for a professional in the industry much less a high school student.

I have to say that this is all very intimidating for a brand new team that is just getting off of the ground. It doesn't help when PBS is filming the entire thing the whole time!

Kevin, you don't have to convince me about state machines. AI programming is my absolute favorite code to work on in computer games. I use a combination of state machines with memory to create AI's that avoid 'brain lock'. The other thing I really care about when writing AI's is to have them always dealing with lots of problems simultaneously in parallel.

I use a combination of state machines, memory, modular systems, and interrupts to create AI's that behave in a very natural way. I typically break systems out into various components (path finding, vision processing, emotional state, goal oriented behavior, etc.) and run all of these systems simultaneously in parallel feeding back to an interrupt driven state machine which runs via a scripting language on a virtual machine. A state machine, coupled with memories to avoid 'brain lock' allows a system to be extremely reactive and adaptive to its environment.

However, as my friend John Miles (http://www.thegleam.com/ke5fx/) likes to remind me, I need to learn to walk first before I start getting too far ahead of myself. By the way, if you don't know who John Miles is, he is an engineer worth knowing...

I do have one question in response to some of the answers I have received in this thread.

Why does it make any difference if I'm programming for a VEX or FRC controller? They both effectively have the same PIC micro-controller and execute the same basic logic.

I mean, worst case scenario I link to a different script, what does it matter which controller I run the C code on?

Thanks,

John

Last edited by jratcliff : 13-01-2008 at 02:29.
  #18   Spotlight this post!  
Unread 13-01-2008, 03:20
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,729
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: Help, I'm a world class computer programming genius yet I'm totally lost.

John,

First, I'll apologize now for lying in my last post about it being my last long winded post of the night....

To answer your last question first, in the broadest sense, it doesn't matter too very much if you're programming on Vex or FRC. The fundamental structure of the code is rather similar. Superficially, the inputs to the Vex controller are more limited and only consist of those few PWM_in# variables that tell you the position of the radio controller's sticks. These are equivalent to the p#_x, p#_y, etc on the FRC. The Vex controller doesn't have any equivalent of p#_sw_top, etc. Similarly, the vex's pwm## variables are equivalent to the same on the FRC. The FRC also has the relay#_fwd/rev variables that don't have vex equivalents. Digital IOs, analog inputs, and the serial ports are all mostly equivalent. The lack of physical space on the Vex brain meant IFI had to multiplex the analog inputs with the digital IOs, but this is not the case on the FRC controller.

Finally, because the FRC system plugs into a computer controlled field, the FRC controller receives bits instructing it to enter Disabled mode or Autonomous mode. Both as as they imply. In Disabled, your receive valid input from the operator console, but all outputs of the robot are disabled by the master processor, save the digital and analog IOs. In Autonomous, outputs are enabled, but the robot is intended to be on its own, so all inputs received from the operator console are invalid. The final operating mode is Teleop, which is the default if not in the other two modes. Inputs and outputs are both valid in this mode.

Now, here's the good news. Those massive tomes about the PIC microprocessors? You honestly barely need to read them. Nearly all of the onboard peripherals on the user PIC are either taken up by IFI or routed to pins on the exterior of the robot controller the are buffered or otherwise rendered useless for most advanced functions. If you're really determined, you mostly need to read up on three things. Interrupts, Timers, and CCPs. In that order, preferably. If you're really pressed for time, Kevin Watson has a LOT of functionality already coded up and in highly bug-tested form. If you're feeling more adventurous, I would look into Kevin's C18 3.10 version code or the restructured C18 2.4 code mentioned in this thread. This simple bit of restructuring makes the program flow much more intuitive and easier to follow.

That said, a large percentage of robots out there get by with little more than the "joystick 1 makes this motor go, button 3 makes this light blink" kind of code you mentioned earlier. After getting that far, I'd make it your primary goal to get some encoders on your robot's wheels/drive motors and attempt to implement a PID control on your drive speed. Robot drivetrains are notoriously poorly balanced and it can be easy to spot teams without PID control, as the robot will make a very graceful, large diameter arc whilst attempting to drive straight across the field. If you get that far, implementing a useful autonomous mode is fairly easy. You can use the encoder to measure the distance your robot has traveled use that to transition a state-machine design to get your robot driving down the field and making a left turn or whatever it seems appropriate to do.

So, like I said, you don't strictly need all the extra knowledge in those tomes. It CAN come in handy, of course. We used such esoteric knowledge one year to count the pulses on an encoder at rates much higher than it would be feasible to count them using interrupts. But by and large, you mostly need the info in all the IFI guides and manuals and the lack of time to make using Kevin Watson's code seem like a great idea.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #19   Spotlight this post!  
Unread 13-01-2008, 05:20
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

I have been doing this for 11 years now. I have given seminars on programming. You do not need to go to great detail for this. When you have time read Kevin's stuff at your lesure but for now you can put it to good use. I have several presentations you can use and as you have a background in C most of the gooey details should be pretty easy to master. You can get these at www.frc272.com.Ideas.

Good luck
  #20   Spotlight this post!  
Unread 13-01-2008, 05:22
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Sorry for messing up the URL in my last post. The presentations are at www.frc272.com/Ideas (Capital I in Ideas)


Sorry, fat fingers...
  #21   Spotlight this post!  
Unread 13-01-2008, 05:33
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

PWM
Pulse Width Modulated output.(byte) Range 0-255, mid range =127. Joystick output. This applies to Speed controller via a control cable (White, red, black). This tells Speed controller how much voltage and polarity. (forward or reverse). You assign joystick value to pwm output.

pwm01 = p3_y; // left driver joystick



Relay
Separate module connected via control cable to Spike Relay controller.
Has two variables _fwd _rev. When controlling motor it will apply full power in foward or reverse.
relay1_fwd = 1;
relay1_rev = 0;

To turn it all off ...
relay1_fwd = 0;
relay1_rev = 0;


Once you compile your code you must download it to micro. Go ti IFI for loader and instructions. Ther eis a default code base that helps get you started.
  #22   Spotlight this post!  
Unread 13-01-2008, 08:48
ebarker's Avatar
ebarker ebarker is online now
Registered User
AKA: Ed Barker
FRC #1311 (Kell Robotics)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Kennesaw GA
Posts: 1,437
ebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond repute
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

very short winded answer.

open default project;
learn user_routines.c - used for default tele operation
learn user_routines_fast.c - used for hybrid/auton operation

download several kevin.org projects, like adc and encoder
carefully READ the readme.txt in these projects. they are precise and step by step.

use something like WINDIFF and examine the differences between the kevin projects and the default project. There you will see how he incrementally added features to the default project.

I use TREECOMP and WINDIFF to do deltas on the projects. There are other tools that do the same.

This is about the fastest quickstart I can think of for an experienced programmer. I would do all of that before jumping into processor datasheets and stuff. There is a LOT of framework that is already done. All you have to do is add your algorithms and go.
__________________
Ed Barker
  #23   Spotlight this post!  
Unread 13-01-2008, 09:22
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Quote:
Originally Posted by mluckham View Post
Another bit of information ... the PIC microcontroller and runtime environment used in FIRST hasn't changed much in the past several years (since 2004? well, a couple of years ago they changed the PIC part to a different one with more memory, and last year they changed the radio, but both run the same code at the same 10 MHz speed). The rule seems to be "incremental changes" and "don't mess with success - it only causes problems".

So assuming they don't change in years to come, information gleaned is not totally wasted. But since when does technology stand still?
It has been rumored this is the last year for the current architecture. Now what exactly will change is anyones guess.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
  #24   Spotlight this post!  
Unread 13-01-2008, 11:52
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Part of the acronym soup for this group is PID. It's a shorted version of proportional-integral-differential control. The idea is to use a sensor to measure an actual output, compare it to the commanded output, and adjust until they converge. I think you can get by with a proportional term only the most of the time. There are lots of samples on these forums.

You can also use the technique to move from "relative" to "absolute" position. The basic example is a servo, which moves to a fixed position based on the input command. Instead of saying "go forward" or "go backwards" you call tell it to "go to position X".

The sensors commonly used are:

1) Gyro - analog sensor measures angular velocity. By sampling at a fixed interval integrating the output you can convert the value to a relative angle (think compass).

2) Encoder - device that measures rotational distance by being physically coupled to the thing you want to measure. As the shaft rotates it outputs a series of "ticks". They have a fixed number of "ticks" per rotation. By counting the ticks you can measure distance, and by accruing the distance over time you can measure speed. A quardature encoder allows you to determine both distance AND direction.

3) Potentiometer (pot) - variable resistor that outputs an analog value relative to the position of the shaft. This is useful for measuring a joint with a fixed arc (like an arm). For the arm application you can compare the output of the pot to the commanded value and drive the motor until the two values match.

Using this stuff you can write code to make your robot drive the way you want. For a simple tank-style robot I like to break it down into two commands: forward and rotation. Using a gyro or encoders you can more closely relate your forward/rotation commands to the actual performance of the system.

Good luck!
  #25   Spotlight this post!  
Unread 13-01-2008, 12:16
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

Another important resource for specific hardware info is the IFI FAQ Forum
OI FAQs
RC FAQs
Victor Speed controller FAQs

In my opinion the most important of which is the Outputs Steps FAQ.
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"
  #26   Spotlight this post!  
Unread 13-01-2008, 13:08
Steve_Alaniz Steve_Alaniz is offline
Registered User
FRC #2848 (All Sparks)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 1997
Location: Dallas
Posts: 211
Steve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond repute
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

HAH! NOW aren't you sorry you didn't listen to your mother when she told you to stop coding, get off that computer and ...build a Circuit! (Sorry, I'm mainly a Tech Type...)
One thing I'm not sure anyone mentioned was the Dashboard Monitor.
The robot may be a pile of parts but if you can tether the Robot controller, power up the Operator Interface and using the Dashboard Program, download and At least see the effects on the PWM and buttons.
The with minimal hardware just power a relay or use a switch to see the inputs. Things like that.
You could do some simple programming while the robot is being build instead of waiting.
Hope this was a useful suggestion.

Good luck

Steve
  #27   Spotlight this post!  
Unread 13-01-2008, 15:57
Mauri Laitinen Mauri Laitinen is offline
Registered User
FRC #0115 (MVRT)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2004
Location: Cupertino, CA
Posts: 1
Mauri Laitinen is an unknown quantity at this point
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

I faced the same difficulty a few years ago when I started mentoring my daughter's team. I found that picking up a copy of "Programming and Customizing PICmicro Microcontrollers" by Myke Predko explained the odd acronyms and machine-specific identifiers.

While a lot of the book concentrates on basic architecture, you'll probably be more interested in the sections on timers and interrupts, including CCP. It beats trying to figure things out from datasheets. I picked up my copy at a Borders bookstore.

I'd also suggest looking at the MPLAB C18 User's Guide (available on microchip.com) especially the section on "ISO Divergences." It also discusses interrupt handling.

As everyone else has said, Kevin Watson's code is pretty much the definitive model for programming the robot controller.

The other place to help get up to speed is the white paper section of Chief Delphi and some of the kickoff seminars on the FIRST website.

Good luck.
  #28   Spotlight this post!  
Unread 13-01-2008, 16:17
Steve_Alaniz Steve_Alaniz is offline
Registered User
FRC #2848 (All Sparks)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 1997
Location: Dallas
Posts: 211
Steve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond repute
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

OOPS! I Meant to say... Power Up the Robot controller... the Operator Interface will get it's power from the Robot controller... My Bad.

Steve

Quote:
Originally Posted by Steve_Alaniz View Post
One thing I'm not sure anyone mentioned was the Dashboard Monitor.
The robot may be a pile of parts but if you can tether the Robot controller, power up the Operator Interface and using the Dashboard Program, download and At least see the effects on the PWM and buttons.
  #29   Spotlight this post!  
Unread 13-01-2008, 17:02
jratcliff jratcliff is offline
Registered User
no team
 
Join Date: Jan 2008
Location: Lake Saint Louis, Missouri, USA
Posts: 10
jratcliff will become famous soon enoughjratcliff will become famous soon enough
Re: Help,....

Thanks all for the excellent advice. I have been reading documentation today and I think I have a handle on the flow of control now.

I did run into one weird problem, I wonder if anyone else is having. I tried downloading the latest version of the MPLAB-IDE from the microchip website and every time I download any version I get CRC errors when I try to unzip the file. Has anyone else experienced this?

To answer a few points that were raised in the thread.

(1) I am mentoring a total of six students on our FRC team in programming. I spent four hours giving them a one on one training course on Saturday; these were all Freshmen with little to no programming experience with the exception of my son.

(2) My son is really interested in taking a leadship position on the team. He has been programming for quite some time and is really excited about contributing not just this year, but in years to come. My personal goal is to give him enough experience working with the VEX robot at home that he can be much more involved on the FRC project at school. The robotics club meets frequently but with my work schedule the only time I can make available is on Saturday.

(3) The reason I am focusing on MPLAB and C, rather than Easy C, is because that is easier for me personally at this time. I'm sure the youth will have opportunities to be exposed to the Easy C paradigm at future events throughout the year. However, in the short term, it is much easier for me to just program in native C code since that is a high iteration cycle path. Yesterday I felt a bit lost in all of the acronyms but a morning of reading yet more documentation is going a long way towards getting me up to speed.

Thanks all for the help getting started, it is my hope that I will be of assistance to the general FRC community in years to come and I certainly want to help mentor students in the St. Louis area after this season has completed.

Thanks,

John & Alex
  #30   Spotlight this post!  
Unread 13-01-2008, 17:31
Jake M Jake M is offline
void* Jake;
FRC #1178 (DURT)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Missouri
Posts: 118
Jake M has a spectacular aura aboutJake M has a spectacular aura about
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

It is true that the programming system is far too extensive to learn within six weeks. For experienced teams, that's not a problem, because in the past four years, the only changes that have been made were tweaking and debugging. For new teams, that's a different story. The only advice I can really offer is that of all the info you'll find in the documentation, you'll only ever use maybe 10% of it. IFI does take care of a LOT of stuff for you, so you don't really have to worry about it.

I've read a good deal of the documentation myself, little by little over the years, so I have a fairly good idea of what the controller is capable of, but I've never read them too far in-depth. I'd recommend the same to you, at least until the main season's over. As much as possible, use the default stuff IFI provides and utilize resources like the IFI Default Code Manual, Kevin Watson's stuff (as if that hasn't been said enough already), and particularly this site. There's always someone here knolwedgable and willing enough to answer questions, or at least show you where to find the solution. Plus, odds are someone's already asked most of your questions before.

And I agree with you on the EasyC point. When they introduced EasyC after my first two years of just straight C, I gave it a shot and found myself confused to no end. I eventually worked out a few basics, but found that it was just so much easier to use straight C, and in the end, the code produced was smaller and more efficient. Besides, C isn't the hard part of programming the FRC or FVC controller. The hard part, like you said, is integrating what you know with the hardware specifics of the PIC controller.
__________________
Code:
void function(void)
 {
  function();
 }

Last edited by Jake M : 13-01-2008 at 17:35.
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
AHHH! I'm a lost newbie! I need help! lkdjm Programming 8 28-01-2006 08:41
i'm in the charleston area, and i'm looking to help out a team near here... dickymon General Forum 2 05-08-2002 16:40
OK...so I'm totally out of the loop... Markfuscius 3D Animation and Competition 8 03-02-2002 02:39


All times are GMT -5. The time now is 10:07.

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