Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Keypad instead of joystick? (http://www.chiefdelphi.com/forums/showthread.php?t=124345)

Sparkyshires 08-01-2014 22:05

Keypad instead of joystick?
 
Hello all!
I've been thinking about using a keypad instead of a joystick for our secondary driver, as he normally has a lot of mechanisms to keep track of and hardly ever seems to use the stick part of the joystick.

My question is thus: Does anyone have experience programming third party keypads? This may sound crazy noob, but can you honestly just plug up some logitech keypad and all the functions are the same (GetRawButton, etc.,) or are there other libraries that are going to have to be downloaded, and if so do you guys have any recommendations for good/easy to program keypads?

Thanks!

PAR_WIG1350 08-01-2014 23:47

Re: Keypad instead of joystick?
 
You could use an IO module to build a custom keypad (or interface to the raw input from an existing keypad).

In your code you would treat it just like a joystick, but you can physically configure the buttons any way you want to.

Sparkyshires 09-01-2014 07:30

Re: Keypad instead of joystick?
 
whoa, thats awesome :O I'd never seen that before! thanks so much!

Zuelu562 09-01-2014 07:47

Re: Keypad instead of joystick?
 
Sparky, this is something I've dealt with in the past, starting with a PS2 Controller and eventually the XBox controller. In practice, you can use getRawButton (and getRawAxis) to slowly figure out what is what on the pad. Either output it directly to the DS User Messages or put it to the dashboard to make it really easy. I think you'd know, but just for reference, make sure you don't have any commands tied to the buttons/axes you are trying to discover and understand!

If you really need to get it done and have no time for a handbuilt joy pad, this is a solution.

Sparkyshires 09-01-2014 08:07

Re: Keypad instead of joystick?
 
yeah that would be pretty bad! Well that was why i was considering this now, so that we'd have all build season and the end of february and early march cause we're a week 4. I'd never heard of a custom keypad, that sounds like a really neat idea. that CCI control looks sweet.

dyanoshak 09-01-2014 10:20

Re: Keypad instead of joystick?
 
Quote:

Originally Posted by PAR_WIG1350 (Post 1324253)
You could use an IO module to build a custom keypad (or interface to the raw input from an existing keypad).

In your code you would treat it just like a joystick, but you can physically configure the buttons any way you want to.

The TI LaunchPad in FIRST Choice can also be used as an input module. After loading some new firmware, you can use the LaunchPad alone or with the Breakout BoosterPack (available very soon) as a set of two plug-n-play gamepads. Each gamepad has 11 digital and 4 analog inputs (22 and 8 in total).

Check out this link for more information: Using the Stellaris or Tiva LaunchPad in the FIRST Robotics Competition

I also have a CD thread that will be updated once the BoosterPack is ready to order.

-David

Joe Ross 09-01-2014 14:16

Re: Keypad instead of joystick?
 
Quote:

Originally Posted by Zuelu562 (Post 1324333)
In practice, you can use getRawButton (and getRawAxis) to slowly figure out what is what on the pad. Either output it directly to the DS User Messages or put it to the dashboard to make it really easy.

There's a new tool for doing this on the driver station. See http://wpilib.screenstepslive.com/s/...3053-joysticks and scroll down to Determining Joystick Mapping

SuperBK 09-01-2014 16:29

Re: Keypad instead of joystick?
 
Joe - thanks for pointed that tool out.
Brian


All times are GMT -5. The time now is 12:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi