
16-01-2011, 23:55
|
 |
In a server room somewhere...
AKA: Dustin Shadbolt
 FRC #1555 (Team PULSE)
Team Role: Alumni
|
|
Join Date: Jan 2010
Rookie Year: 2010
Location: Monticello,Indiana
Posts: 320
|
|
|
Re: Multiple outputs
Quote:
Originally Posted by MotorHead
Read each button and put into a binary array. Then convert the array to a number. Your select case can then test for which number shows up. If you are watching four buttons, there would be a possible 16 cases. But since you probably only need to detect if one button is pressed, your test cases would be 1, 2, 4, 8. A very similar technique is being used in the sample line follower code that came with LabView this year.
If you need sample code, let me know. I will be at the lab tonight and can make it real quick.
|
Hey Jeff,
I was interested in seeing that code as a example that could learn from. Thanks!
|