Programming Tips

From Team1370

(Difference between revisions)
(split off the tutorial)
(Aliases to keep in mind: Added link to our code)
Line 13: Line 13:
This alias represents the value of one of a specific joystick's buttons. It may be from one of the four possible joysticks, of which it may be either the trigger, top, or side buttons.  ''Values are either 0 (normal) or 1 (pressed)''
This alias represents the value of one of a specific joystick's buttons. It may be from one of the four possible joysticks, of which it may be either the trigger, top, or side buttons.  ''Values are either 0 (normal) or 1 (pressed)''
 +
 +
 +
Here is a link to the current version of our [[Robot Code 2006]], which is a good example of various programming techniques we use.

Revision as of 19:06, 7 February 2006

Aliases to keep in mind

  • pwm## where the number ranges from 01 to 12 (and up to 16 if the "Generate_Pwms(pwm13,pwm14,pwm15,pwm16);" is included in the "void Process_Data_From_Master_uP(void)" function of the user_routines.c file)

The pwm## alias is used to assign an output value to the speed controllers according to the pwm slots that they are each plugged into. Values range from 0 to 255


  • p#_? where the number ranges from 1 to 4 and the ? sign is either "x", "y", or "wheel"

This alias represents the value of one of a specific joystick's axis positions. It may be from one of the four possible joysticks, of which it may be either the x-axis, y-axis, or throttle wheel (if one exists). Values range from 0 to 255


  • p#_sw_? where the number ranges from 1 to 4 and the ? sign is either "trig", "top", "aux1", or "aux2"

This alias represents the value of one of a specific joystick's buttons. It may be from one of the four possible joysticks, of which it may be either the trigger, top, or side buttons. Values are either 0 (normal) or 1 (pressed)


Here is a link to the current version of our Robot Code 2006, which is a good example of various programming techniques we use.

Personal tools