|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Arduino as driver station joystick?
My team wants to be able to use an Arduino Uno board as a joystick with Labview, but i'm not sure if it's against the 2013 FRC rules because i can't find it in the rulebook.
Does anyone know if it's legal in the game or do I have to use a different joystick? If it's legal, how do I get the Arduino to input as a joystick with buttons and axes into labview's joystick control? |
|
#2
|
||||
|
||||
|
Re: Arduino as driver station joystick?
I know of no rules against it, but you might try the Q&A.
However, as far as I know, the uno is incapable of being a USB human interface device. I have also heard there is a different arduino that IS meant to do that. |
|
#3
|
||||
|
||||
|
Re: Arduino as driver station joystick?
Using an Arduino as a joystick is legal. But a better option may be the Cypress board that was included in the Kit of Parts, as it was provided to create a custom controller.
If you search on www.arduino.cc , you may find tutorials that input switches and pots and emulate a USB HID device just like the Logitec joysticks provided. |
|
#4
|
|||
|
|||
|
Re: Arduino as driver station joystick?
You might want to look into the Teensy 2.0 (OR 3.0) . It has hardware USB support, uses the Arduino IDE, and is very simple to use.
It is similar to the Arduino Leonardo, where the chip supports HID, but has many more libraries and easy-to-use features. Teensy Joystick Examples Teensy 2.0 - $16 It's definitely worth a look ![]() |
|
#5
|
||||
|
||||
|
Re: Arduino as driver station joystick?
WE just want Labview to read/initialize it as a joystick like the other USB stick we use, but this one just has maybe a couple toggle switches, a few buttons and status LED's for certain conditions.
If the uno is incapable of being a Human Interface Device, then can labview at least read the value of the pins to do the same thing? We didn't get a Cypress board with our kit this year, we're veteran. Would the Cyress be easier to use with Labview if we bought that instead? Thank you guys for all the quick responses!! |
|
#6
|
||||
|
||||
|
Re: Arduino as driver station joystick?
Quote:
If you really need both I and O, then the Cypress would indeed be easier to use as a framework is already in place to implement it. If you only need I, however, then the CCI may be a simpler option. It's a product offered by eStop Robotics that emulates a USB Joystick and allows you to feed sensor input to the robot through the Driver Station. If you've never done this before, I would suggest going with the CCI as it is a much simpler and robust product to work with. Think about how critical being able to send outputs to your operator interface is - how often is your operator going to look down at his control panel while he's behind that glass? Is he going to be able to interpret that data and actually use it in a match? Alternatively, as previously mentioned, you can use the Teensy (4334 has a whitepaper here on CD about their implementation of it as a), which can emulate a USB Joystick. Alternatively, it can be implemented as a HID or serial device. Keep in mind that when a device is implemented as a Joystick, it is only capable of feeding input to your system - it cannot receive output. |
|
#7
|
||||
|
||||
|
Re: Arduino as driver station joystick?
A word of caution about the Cypress boards. We used it last year and had horrible results. We went through two boards (both failed while in use) and learned from other teams at our regional that they have all abandoned the module because of its lack of reliability.
Here is a tip - buy a cheap joystick (used on ebay ~$10) and rip it open. You now have plenty of switches and pots for external control. If you need mor input, get a second joystick. You can use up to 4 if I remember correctly. We did that, worked like a charm. Good Luck. ![]() |
|
#8
|
|||
|
|||
|
Re: Arduino as driver station joystick?
If you want to stick with the Arduino ecosystem, the new Leonardo board has the capability to act as a HID device. It costs $25 from Sparkfun.
http://arduino.cc/en/Main/ArduinoBoardLeonardo https://www.sparkfun.com/products/11286 |
|
#9
|
||||
|
||||
|
Re: Arduino as driver station joystick?
@cdewane, do you know more about the Arduino/Leonardo HID? Availability of Libraries etc.? Thanks.
|
|
#10
|
|||||
|
|||||
|
Re: Arduino as driver station joystick?
Uhid can get button/analog data into a HID data structure. Looks like a HID (no drivers) to the Driver Station. Input only (when acting as a joystick). It's awesome.
I personally hated the Cypress board when we used it in 2010. We will NEVER use it again, we had far too many reliability issues with the drivers. The drivers then were very very unstable and would lockup after coming out of sleep, and we had to write code to workaround a lack of Cypress input and map key function to other places (on the driver's gamepad). |
|
#11
|
|||
|
|||
|
Re: Arduino as driver station joystick?
@pribusin While I have used various Arduino boards over the years, I don't yet have a Leonardo. The Leonardo just came out this summer with HID support out of the box. Keyboard/Mouse emulation is the easiest, but I did a quick Google search for "arduino leonardo hid joystick" and found that people have gotten joystick emulation working as well. It may take a little more effort but it seems possible. I am a huge fan of the Arduino platform, very affordable and easy to use.
|
|
#12
|
||||
|
||||
|
Re: Arduino as driver station joystick?
If we got the Leonardo, is there something that would need to be implemented into it's code that would let it input into Labview just like any other USB joystick? or would it just do itself with the HID protocol.
|
|
#13
|
||||
|
||||
|
Re: Arduino as driver station joystick?
If it's a true HID implementation then it needs no drivers and LabView should recognize it as any normal joystick with its analog axes and digital buttons.
We're still looking for an alternative to the Cypress module for its output capability so that we can send outputs back to our control box on the driver station. A joystick, keyboard or mouse HID can't do that. |
|
#14
|
||||
|
||||
|
Re: Arduino as driver station joystick?
So is there any code that would need to go into it at all? Wouldn't there have to be some code running on it telling Labview how many buttons or axes there are on it?
|
|
#15
|
|||
|
|||
|
Re: Arduino as driver station joystick?
Looks like at this point, joystick emulation is still a little bit of work as opposed to keyboard and mouse which just works.
The Leonardo would have to be programmed to make it all work. Here are two posts I found from people who have done it with information on how to replicate. http://www.imaginaryindustries.com/blog/?p=80 http://blog.qwertymodo.com/2012/07/a...ad-part-1.html With this, you should be able to plug in the Leonard and Windows will detect it as a joystick. Labview would never know the difference between it and a standard joystick. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|