Go to Post I guess my only option is to either stop picking on Dave or come up with an even better picture! Now, which one do you think I'll choose? - MissInformation [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 29-12-2004, 10:38
Jeff_Rice's Avatar
Jeff_Rice Jeff_Rice is offline
ElementisRegamusProelium
#1359
Team Role: Programmer
 
Join Date: Dec 2002
Location: Linn County
Posts: 283
Jeff_Rice will become famous soon enoughJeff_Rice will become famous soon enough
Senior Programmer: advice on training new recruits

Hey all,

This is Jeff Rice of team 1359, and I am currently the only programmer, but we have some new recruits who are interested. I would like some advice as how to best train them and prepare them for next season when I will be just a mentor (or maybe a metnor, nodding at snesors and sesnors). Don't chastise me too badly if there is another thread like this as I have searched and was unable to find it.

Thanks,
Jeff
__________________
"He said my name is Private Andrew Malone
If you're reading this then I didn't make it home
But for every dream that's shattered another one comes true
This car was once a dream of mine now it belongs to you
And though you may take her and make her your own
You'll always be riding with Private Malone" David Ball, "Private Malone"
  #2   Spotlight this post!  
Unread 29-12-2004, 10:47
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Senior Programmer: advice on training new recruits

It depends on how much previous programming experience they've had. Do they know C already and actually used it before? Do they know any other programming languages? Depending on how much they know already, you can give them control of actually doing the writing and have them turn in all code to you for review before it becomes an 'official' part of the robot's code. After you look over the code, you could tell them what could be improved, where the logic errors are, etc. You can also help to lead them in figuring out exactly what they're going to try to do in the code.

That assumes they have at least some basic knowledge of C and general logical thinking and it also cuts you out of a lot of the programming, but it will definetly help them to learn for the future.
__________________

  #3   Spotlight this post!  
Unread 29-12-2004, 12:34
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Senior Programmer: advice on training new recruits

As Ryan said, do they know C? If they do, give them a little test to see if they're good at it, teach them more if needed on a Windows/Linux environment. Then introduce them to programming micro controllers, its a whole new programming environment for them. Give them documents from IFI and Microchip if you can, or at least links to them. Microchips documents are a bit advanced so they're better off with IFIs. And then its Teach, practice, teach, practice, teach, practice, teach, real run.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #4   Spotlight this post!  
Unread 29-12-2004, 13:44
GeorgeTheEng's Avatar
GeorgeTheEng GeorgeTheEng is offline
Former Lord of the Vex
AKA: George Marchant
FRC #0087 (Red Devils)
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2000
Location: Mount Laurel, NJ
Posts: 166
GeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud ofGeorgeTheEng has much to be proud of
Send a message via AIM to GeorgeTheEng
Re: Senior Programmer: advice on training new recruits

I put together some materials this year because our school offers no programming courses and our kids don't have any idea how to start. It's a set of basic concepts, and exercises. A few slides, then some things to try, and back to some slides.

I used some of our alumni's college materials as a start, and tried to stick to only those things I thought neccessary for robotics. At the same time, from reading some of the forums, our code tends to be a bit simplier then some. We practice the K.I.S.S. principle.

If you want to see the material or want any information, let me know.

George Marchant
Team 87
  #5   Spotlight this post!  
Unread 29-12-2004, 13:57
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Senior Programmer: advice on training new recruits

Quote:
Originally Posted by GeorgeTheEng
If you want to see the material or want any information, let me know.

George Marchant
Team 87

Yes, absolutely. I'm leading a team of guys, one of whom has done a little C, but the others' experience is limited to html "programming" at most. So I'm starting from scratch. I walked them through "hello, world", and that was a big step.

On the other hand, I did all the programming last year, so I am pretty familiar with the PIC compiler, etc. I'd like to see how you approach teaching programming.

Thanks!
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #6   Spotlight this post!  
Unread 29-12-2004, 15:36
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: Senior Programmer: advice on training new recruits

This is the second year we've attempted to teach C to some students with absolutely no programming experience so I can offer a bit of advice.

Last year we tried the textbook method and started with programming basics by giving them examples on the board of expressions, assignment, conditionals, loops, etc. We then moved on to an overview of variable types, arrays, and other fun stuff. I'm not exactly sure what we did next but it doesn't matter since that approach was an absolute failure. The students were bored so they didn't pay attention, and the material they learned in one class they forgot by the next. The mistake we made was we tried to give all the details and explain the theory behind everything we tought. What a disaster.

This year we tried the complete opposite. From the start we did a bunch of hand-waving over the details and told them that we'd explain it all later. We wanted to get them writing code on day one. We explained the very basics of C: you write some code in a text file, the laptop converts it to code the RC can understand, then you download it to the RC. We showed them a C file, then we broke up into small groups and tackled some pre-planned exercises. Wildstang is fortunate to have many mentors who write software for a living so we had four groups each with one mentor and two students. The exercises used two joysticks, the LEDs on the RC, and 4 servos. We tried to base them on concepts we will use when we start programming the robot in January. We started with easy exercises and increased the difficulity as we progressed: direct map of a joystick to a pwm, proportional map, direct map with a cap on the output, direct and inverse map of joystick button to LED, LED toggle when button is pressed, add to & subtract from pwm when buttons are pressed, change pwm direction when button is pressed. As the groups wrote code they would download it to the RC and test it. The groups worked the exercises as a team and the mentors explained the concepts of assignment, expressions, and contitionals as the group encountered exercises that required it. We found this method worked extremely well; the students were excited because they got to write a few lines of code and immediately test it, if a student didn't get a concept the mentor with that group was able to spend more time explaining it until it made sense, and the students got to see how exciting programming is .

Our goal this year is to keep the students excited and engaged. If we have to gloss over the in depth details in order to teach the basics we'll do it. Once they get the basics and start asking questions we'll teach them as much as they can grasp. Once they get that we'll go deeper. I can't ask a bunch of students who have no programming experience to write a PID loop from scratch, but I can hand-wave the theory of a PID loop and have them write a few lines that set the PWM value, then have them write a few lines that calculate the 'P', then a few more, and by the end they've written a PID loop. Then I can explain the details & the theory. Hopefully this method works.

Teaching software to complete newbies is not an easy task because it involves thinking in a way that they're not used to. You'll have to work one-on-one with each student to make sure they're getting all the concepts. Don't walk them through anything, have them do the typing. Have them write some code as soon as possible, they'll learn it better and be more excited than if you just explained it on the board.

If you want me to upload the code we used for the exercises, just ask.
  #7   Spotlight this post!  
Unread 04-01-2005, 08:43
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: Senior Programmer: advice on training new recruits

I would like anything any of you guys have or any advise because I have no programming experience really, but I am learning basic C

So far I have programmed 2 servos with someones help on here, but I still don't know much

I am 1 of only 2 or 3 programmers on my team. Any help or advise would be greatly appreciated.
__________________
  #8   Spotlight this post!  
Unread 04-01-2005, 08:47
Stephen Kowski's Avatar
Stephen Kowski Stephen Kowski is offline
BSEE, MSEE, JD
AKA: employed
no team
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Saint Petersburg, FL
Posts: 1,144
Stephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond repute
Send a message via AIM to Stephen Kowski
Re: Senior Programmer: advice on training new recruits

an idea that i like that has been done before with the teams I have been on is have the new students program the old robot.....do not show them the old code from the previous year, but see if they can match the functionality as the previous year....have them start out with the default code and see what they can do and for the things they cannot is what you can help them understand.
  #9   Spotlight this post!  
Unread 04-01-2005, 16:55
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: Senior Programmer: advice on training new recruits

doyler-

Here are the exercises we worked through with our students. Start with the 2004 default code and replace user_routines.c with the attached file. Hook up joysticks to ports 1 & 2 and servos up to pwm 1-4. To run the different labs you'll have to change 'labNum' to the desired lab number.

To simplify everything for my students I created some new analog input & output variables ws_p1_y, ws_pwm01, etc that are signed integers. The range on these variables is the more intuitive -127 to 127 instead of 0 to 255. I also took care of overflow on the outputs so you can assign ws_pwm0x a value greater than 127 and it will get capped at 127.

Try to work through these exercises on your own and ask for help if you need any.
Attached Files
File Type: txt user_routines.c.txt (10.2 KB, 71 views)
  #10   Spotlight this post!  
Unread 04-01-2005, 16:59
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: Senior Programmer: advice on training new recruits

this is all i have done so far with a lot of help from someone on cd

Code:
/*******************************************************************************
* FUNCTION NAME: Process_Data_From_Master_uP
* PURPOSE:       Executes every 17ms when it gets new data from the master 
*                microprocessor.
* CALLED FROM:   main.c
* ARGUMENTS:     none
* RETURNS:       void
*******************************************************************************/
void Process_Data_From_Master_uP(void)
{
static unsigned char servo1=0;
static unsigned char servo2=0;
static unsigned char counter=0;
static unsigned char counter2=0;
Getdata(&rxdata); /* Get fresh data from the master microprocessor. */
 
Default_Routine(); /* Optional. See below. */
 
/* Add your own code here. */

 
/*BEGIN SERVO 1 IN PWM 1*/
/*
if (counter < 59)
*/
/*
(counter < n) is the time between each distinct movement of the servo. Where n/59 = the time seconds. For example, 
n= 59 is 1 second, 
n=118 is 2 seconds, 
n=30 = ˝ second
*/
/*
counter++; 
else
{
counter = 0;
if (servo1 < 254)
	servo1++; // servo1 will slowly step through each of it’s positions //servo1++; will make it move slower, but it is default
*/
/*
servo1 += y) is how large a movement the servo will make each time (according to the above). For example, y=1 position and is the smallest movement the servo can make, y=5 moves 5 servo positions and because of this will appear to be 5 times as fast.
You’ll have to change the limit check “if (servo1 < 254)” to match whatever number you use, to make sure servo1 will never end up greater than 255. For instance, 
if y=5 the check should become “if (servo1 < 250)”
if y=10 the check should become “if (servo1 < 240)”
*/
/*
else
	 servo1 = 0; // servo1 will quickly reset to the zero position
}
pwm01 = servo1;
*/

/*SERVO 1 FAST*/
if (counter < 59) // About a second
	counter++;
else
{
	 counter = 0;
	 if (servo1 == 0)
	 servo1 = 255;
	 else
	 servo1 = 0;
}
pwm01 = servo1;

/*BEGIN SERVO 2 IN PWM 8*/
if (counter2 < 59)
counter2+=58; 
else
{
counter2 = 0;
if (servo2 < 254)
	servo2+=253; 
else
	 servo2 = 0;
}
pwm08 = servo2;

printf("PWM OUT 1 = %d, PWM OUT 8 = %d\n",(int)pwm01, (int)pwm08); /*printf EXAMPLE (edited by me to fill my needs)*/

Putdata(&txdata); /* DO NOT CHANGE! */
}
and i understand it somewhat, but im still struggling and i do not understand yours
__________________
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
Team 342 Training and Organization cbolin Team Organization 1 15-01-2005 10:37
**FIRST EMAIL**/Autodesk Inventor Training Date, Time and Access Information Rich Wong FIRST E-Mail Blast Archive 2 16-12-2004 19:15
Dirty Birds need advice DirtyBird213 General Forum 13 11-12-2003 21:24
Rookie advice for the Championship Event Carolyn Duncan Championship Event 2 07-04-2003 17:57
Problem with the I-Leaning online training Eugene Programming 0 08-01-2003 21:31


All times are GMT -5. The time now is 16:43.

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