View Full Version : Using a Keybard as a controller?
ekapalka
17-03-2013, 21:14
I've been looking into this for quite some time, and I can only seem to find one way to implement a keyboard. Using a Teensy USB dev board and keyboard with USB-to-PS/2 converter, as described here (http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html). Does anyone happen to know another way to do this? I've almost figured out how to do this same thing with a PS/2 mouse, and the keyboard is my next project. Thanks!
Greg McKaskle
17-03-2013, 21:51
I think you can read the keyboard in the dashboard program and send information to the robot using smartDashboards. If done in LV, use the Connectivity>>Input Device palette.
Greg McKaskle
Alan Anderson
17-03-2013, 21:52
Can you be a little more specific about what you mean? There's already a keyboard on most computers, and the few tablet computers without one usually have a USB input for an external keyboard.
Are you trying to control an FRC robot using keyboard commands? You can get keyboard input in a custom Dashboard program and pass it along to the robot using either the SmartDashboard support or a custom communication scheme.
ekapalka
17-03-2013, 22:49
Sorry for the confusion. I meant a competition legal plug and play USB device that we could use for controlling an entire FRC robot, including things such as the space bar, so using the driver-station keyboard is not what I had in mind.
Alan Anderson
17-03-2013, 23:25
I'm afraid I'm more confused than before.
What do you mean by "competition legal", and how does what you want to do differ from using the computer's built-in keyboard?
ekapalka
17-03-2013, 23:59
I'm afraid I'm more confused than before.
What do you mean by "competition legal", and how does what you want to do differ from using the computer's built-in keyboard?
... I researched this topic here before I decided to ask this question, and some people said hat there were legality issues with modifying the driver station (I guess anyone could have said that...). I also wanted to stay away from the main keyboard in case the driver accidentally hits the space bar or something and e-stops the robot. I would like to use a keyboard more like a joystick, where the button presses can be registered, but are meaningless unless the program says so (basically the keyboard doesn't type. It's just a bunch of buttons waiting to be told what to correspond to). In addition, I figured it might be easier to program.
Alan Anderson
18-03-2013, 01:28
You can't modify the Driver Station program, but you can still read the keyboard in a Dashboard program and send commands to the robot that way.
Any keyboard you use will still have a space bar, unless you physically modify it to break that key. Or unless you put a filtering device between it and the computer, which I suppose is what you were trying to get at with the Teensy?
Greg McKaskle
18-03-2013, 08:29
Maybe you want to connect a USB keypad? No spacebar, just a grid of keys that return numbers and a few symbols. Read it from the dashboard, process it or send it raw to the robot.
Greg McKaskle
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.