View Single Post
  #12   Spotlight this post!  
Unread 05-02-2009, 15:47
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Limit Switchers Logic Problem

What you want to do is:

- If no limit switches are pressed, do whatever the joystick says.
- if left limit switch is pressed, two cases:
a.If joystick wants to move lazy susan left, keep motors at 0.
b.If joystick wants to not move or move right(or the "else" case for a.), do as joystick wants.
- if right limit siwthc is pressed, two cases:
a.If joystick wants to move lazy susan right, keep motors at 0.
b.If joystick wants to not move or move left(or the "else" case for a.), do as joystick wants.
- if both limit switches are pressed ( ), stop motors - sirious error! (or someone is cheating )

There's a way where you can put all of these in one big case structe, and in each case ("true" and "false") have another case structre with "true" or "false".
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.