![]() |
custom button panel
hi!
my team is trying to build a custom button panel to control our robot, and we have some questions: - i have read somewhere that the button panel is made of some kind of I/O microcontroller with buttons connected to it. is there a specific one we must use? because we have a microcontroller in our lab (i can't remember his name) which can be used as HID. - how do we make our program to "read" this kind of input? (we use java) thanks in advance! |
Re: custom button panel
Assuming you don't use FRC rule breaking space magic, you'll most likely just be building a joystick with no axes. You can use the TI Launchpad you received in your 2015 KOP, instructions here: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Operator_Interface_for_FIRST_Robo tics_Competition. You can then read it from code just like any other joystick button. You don't have to use this one, any HID compliant joystick will work. This one just has FRC support.
Side note: You can read from autonomous, it just reads the last joystick value right before autonomous begins. |
Re: custom button panel
Quote:
but we won't use this one, i think we don't have it anymore. we have some kind of prototyping kit. if the comuputer can read the signal from the device, the robot code will just "find" it? or we need another software for it? |
Re: custom button panel
Quote:
http://www.cypress.com/documentation...ch-starter-kit |
Re: custom button panel
Quote:
|
Re: custom button panel
Quote:
and i am pretty sure it can act like an HID, we have it because it was used for a simmilar purpose. and thanks for the help! |
Re: custom button panel
Quote:
|
Re: custom button panel
Quote:
thank you very much for your guidance! |
Re: custom button panel
If you have an arduino there is a software called unojoy that uses an arduino board and acts as a joystick.
|
Re: custom button panel
Quote:
The CCI requires no additional software and integrates easily with the FRC supported programming environments. You can find more information on the following page at eStop Robotics: https://www.estoprobotics.com/estore...d&productId=33 |
Re: custom button panel
Quote:
|
Quote:
Can't speak to this product, but eStop makes some pretty neat stuff. We used one of their battery hold-downs this season and loved it. |
Re: custom button panel
Quote:
but i think that if we will buy a new controller it will be an arudino or an msp430 because they are cheaper (the msp430 is in first choice for 20 credits, arduino is about 25$) and they have more I/O us to use. anyone here is familiar with this kind of project and i can contact to him if i need any further help? thank you very much guys! |
Re: custom button panel
I'll second the eStop CCI board, we've used it for the past 4 or so years on all our button boxes. It's incredibly easy, no need to do anything with the board besides plug it into a computer.
Quote:
|
Re: custom button panel
Quote:
|
Re: custom button panel
I've used this Adafruit Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller at about $20.
You wire up switches to the board. It connects to the laptop via Bluetooth. You can program the board to be a sudo keyboard with any key chord combination you want. (ie a,A, ctl-A, Alt-A, ctl-shift-alt-A, etc. ) You can use any kind of switch. There are places you can get joysticks with switches on the axis. Not sure what the FRC rules are around bluetooth keyboards. I've used these to make a wall button setup that talks to a home control computer, fun box for the grandmuchin, and working on a Kerbal Space Command console. |
Re: custom button panel
I've been working on a project for this. Team Fusion has been using this for several years and I made a new revision that fixed a few issues for Garnet Squadron.
Currently I'm working on taking LabVIEW out of the equation and relying on Python and the wxPython extension. Essentially, the board is an Arduino Mega 2560. The only special chip is the LED driver, which is a constant current driver made for driving LEDs. I have the output set at 20mA, which is very common with LEDs. It's easy enough to change though. ![]() Here's the control board Garnet Squadron made for this year's robot: Finally, below is the Python code in action. I'm currently working on a simulator because lets face it... I don't want to carry around the driver station everywhere I go. :) ![]() The good news with the simulator is it works exactly the same as the real board. You can unplug/plug it in and toggle every input as well as see every output. Furthermore, since it works exactly the same as the real board, you can use the simulator to control the robot, or your simulated robot. The simulated robot with simulated button panel is where this can really shine. This code isn't finished yet, but when it is, the GUI will not be shown by default. Instead, there is a taskbar icon that indicates the status of the control board. Green means good; red means bad. ![]() Is this in mass production? No... I need to tweak a few more hardware things. For basic inputs such as switches and potentiometers and with LED outputs, it's great. There are some problems with running servos. They're interfering with the analog inputs. All the design files and software are in our repository here. |
Re: custom button panel
Quote:
Quote:
|
Re: custom button panel
Quote:
|
Re: custom button panel
Quote:
Option B: Use analog input on "joystick" and just break it up into ranges. Option C: Put the control in software on the Driver Station Dashboard and the robot doesn't start auto until it receives its directions. We typically use Option C, particularly as we had at least three different settings to configure each match (goal, position, defense). |
Re: custom button panel
Quote:
Say you have a 6 position switch, you would wire it like: GND-> Position 0 - 2kOhm - Position 1 - 2kOhm - Position 3 - 2kOhm - Position 4 - 2kOhm - Position 5 <- +5V Then connect it to the joystick input. I guess it goes from -1 to 1, like shown below: Pos 0 -> ~-1 Pos 1 -> ~-0.6 Pos 2 -> ~-0.2 Pos 3 -> ~0.2 Pos 4 -> ~0.6 Pos 5 -> ~1 You'll want to factor in some tolerance. It won't be exactly -1, -0.6, etc. In this case, you have 0.4 units between each measurement. You can test between the cases. if ana < -0.8 pos = 0; else if ana >= -0.8 and ana < -0.4 pos = 1; else ifana >= -0.4 and ana < 0 pos = 2; else ifana >= 0 and ana < 0.4 pos = 3; else if ana >= 0.4 and ana < 0.8 pos = 4; else // in this case, this has to be true: ana >= 0.8 pos = 5; |
Re: custom button panel
You can also calibrate the software to the actual values measured. Since this isn't going in the bag this shouldn't be an issue.
|
Re: custom button panel
Quote:
ye olde kaboom XD but i am not looking for something so complicated, i just want to simpify the controls for the operator, because the joystick is sometimes making a lot of headache. i will porbably use an arduino with unojoy, and if it won't work i will use the msp430. i want to use the arduino IDE because i am not a programmer myself (and i do not wish to be XP) and this is the easiest way i can make this work. can i contact you if i will have difficulties with wiring/programing? thanks! |
Re: custom button panel
Quote:
|
Re: custom button panel
We use a keyboard emulator called PoKeys. https://www.poscope.com/products/pokeys-devices/
It's been really easy to work with as you assign values to keyboard keys you wouldn't normally use. Also, if the control panel happens to fail, the operator can make use of the keyboard in an emergency. |
Re: custom button panel
Quote:
![]() ![]() |
Re: custom button panel
It seems like a good time to post our minimalist custom control solution.
https://github.com/frc4646/lightswitch |
Re: custom button panel
Quote:
the power to the light is from an external battery, or the robot battery? can i use this method to control the movement of the robot? |
Re: custom button panel
Quote:
|
| All times are GMT -5. The time now is 15:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi