View Single Post
  #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, 70 views)