View Single Post
  #4   Spotlight this post!  
Unread 15-02-2015, 13:07
Zaque Zaque is offline
FF: Bobo Brigade
AKA: Zachary H.
FRC #3352 (Flaming Monkeys)
Team Role: Programmer
 
Join Date: Mar 2013
Rookie Year: 2013
Location: Belvidere, Illinois
Posts: 91
Zaque has a spectacular aura aboutZaque has a spectacular aura aboutZaque has a spectacular aura about
Re: Counting up and down with a switch

Quote:
Originally Posted by mshafer1 View Post
As GeeTwo stated, something more is really needed for what you are saying, it is possible to either put two switches, or the encoders that he suggested.
I am attaching a snippet that would count up and down as described, - note that it will go 1 or 0 always.
I am also attaching a snippet of what it could look like with the second switch.

I don't have access to LabVIEW for FRC right now, so I am posting a vi that could have the switch read wired into it. I have made it in the form of an FGV, but the point is just the memory of the last value should be used (through either shift register or feedback node)
Not to be rude, but this is the Java sub-forum, so some who do not have experience with LabVIEW may not be able to make heads or tails of the code you posted. If I get time I may be able to translate what you posted into Java pseudocode though .
__________________
Zaque (Zach) H.
President
Programming/Electrical Lead
Reply With Quote