Log in

View Full Version : Keypad instead of joystick?


Sparkyshires
08-01-2014, 22:05
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
You could use an IO module (https://www.estoprobotics.com/estore/index.php?_a=viewProd&productId=33) 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
whoa, thats awesome :O I'd never seen that before! thanks so much!

Zuelu562
09-01-2014, 07:47
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
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
You could use an IO module (https://www.estoprobotics.com/estore/index.php?_a=viewProd&productId=33) 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 (http://firstchoicebyandymark.com/en/fc14-011) 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 (http://processors.wiki.ti.com/index.php/Using_the_Stellaris_or_Tiva_C_Series_LaunchPad_in_ the_FIRST_Robotics_Competition)

I also have a CD thread (http://www.chiefdelphi.com/forums/showthread.php?t=122587) that will be updated once the BoosterPack is ready to order.

-David

Joe Ross
09-01-2014, 14:16
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/3120/m/7912/l/133053-joysticks and scroll down to Determining Joystick Mapping

SuperBK
09-01-2014, 16:29
Joe - thanks for pointed that tool out.
Brian