|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
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. |
|
#17
|
||||
|
||||
|
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. |
|
#18
|
||||
|
||||
|
Re: custom button panel
Quote:
Quote:
|
|
#19
|
|||
|
|||
|
Re: custom button panel
Thanks! So many rules, it's hard to remember what's in and whats out, thanks for taking the time to do the research and posting the rule.
|
|
#20
|
|||
|
|||
|
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). |
|
#21
|
||||
|
||||
|
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; |
|
#22
|
|||
|
|||
|
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.
|
|
#23
|
|||
|
|||
|
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! |
|
#24
|
||||
|
||||
|
Re: custom button panel
Quote:
Last edited by RyanN : 09-16-2016 at 12:23 PM. |
|
#25
|
|||
|
|||
|
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. |
|
#26
|
|||
|
|||
|
Re: custom button panel
Quote:
![]() ![]() |
|
#27
|
|||
|
|||
|
Re: custom button panel
It seems like a good time to post our minimalist custom control solution.
https://github.com/frc4646/lightswitch |
|
#28
|
|||
|
|||
|
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? |
|
#29
|
|||
|
|||
|
Re: custom button panel
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|