View Single Post
  #1   Spotlight this post!  
Unread 18-01-2009, 20:18
ShotgunNinja's Avatar
ShotgunNinja ShotgunNinja is offline
Programming Mentor, FRC 4247
AKA: Nicholas Iannone
FRC #4247 (CougarBOTS)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Kenosha, WI
Posts: 158
ShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the rough
Get Button subVI for LabVIEW

Hey all,

I was messing with LabVIEW and found that there was a Joystick Get and a Joystick Get Axis subVI, but no Joystick Get Button. So I made one. Please let me know if there are any errors, I can't test it right away. This is based off of the Joystick's Get.vi that is included with LabVIEW, and it basically serves to eliminate the hassle of using a cluster element selector block. Enjoy, and give feedback please!

P.S. - The "Index" pin is where you'd wire up an enumerated button selector. It's an unsigned byte value, with enumerated items "Button 1" ... "Button 11" and "Invalid". You could also just put in any unsigned integral, though; it should cast down properly. The output is a single boolean, indicating whether the button is pressed or not. Also, keep in mind that Button 1 (the trigger) is enumerated to 0, not 1.
Attached Files
File Type: zip Get Button.zip (9.4 KB, 73 views)
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)
Reply With Quote