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?
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.
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.
You’d like to use an arduino to mimic a joystick, such then it can generate perhaps programmed joystick moves?
Or were you planning on making your own joystick using the arduino as a method of collecting and processing sensor input (such as encoders) into a joystickesqe USB data stream?
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?
I’m not familiar with how a HID would be implemented, but I’ve never seen it done before, as there are simpler alternatives - namely the Cypress and the CCI.
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.
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.
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).
@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.
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.
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.
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?
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.
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.