View Single Post
  #1   Spotlight this post!  
Unread 22-01-2012, 15:04
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Help Needed with some Simple Programming

Hey there, I am a fairly new programmer and so I just need some help with a few main problems. First of all, how do we put a deadband into the joystick so that we have no ghosting? In pseudocode that would be:
If joystick value < .1 and >-.1
joystick value = 0.
where .1 would be our "dead" area limit.

also how would we set up a motor to run to either the value of an axis on a joystick or a button? more pseudocode:

if button 2 is true then run motor 1 at 1/4 speed
or something like :
set motor 1 value to axis 3 value

i know how i would have to phrase it just not the actual syntax or location.
__________________
Reply With Quote