Thanks for the help ill take a lookYou can use a teensy as an USB joystick
If you want a plug and play solution, I've put my code on github: https://github.com/dmcke5/Ardupadhave you gotten it to work?
I'm having issues with the joystickmalfunctioning as soon as I add other buttons
would it work with the teensy 2 or 2++ as there both atmega32u4 based?If you want a plug and play solution, I've put my code on github: https://github.com/dmcke5/Ardupad
It is for an atmega32u4 based arduino board though (such as the Arduino Micro), not a teensy.
Probably? As long as they are fully supported in Arduino then it shouldn't be a problem I guess. The question really will be over the library that I've used and if it is compatible with the board. If you've got one handy, give it a go for us and report back if it works!would it work with the teensy 2 or 2++ as there both atmega32u4 based?
thanks, I do have a Teensy 2 and 2++, will try and give it a go this weekend if I get time, the 2++ is nice because of all the extra pinsProbably? As long as they are fully supported in Arduino then it shouldn't be a problem I guess. The question really will be over the library that I've used and if it is compatible with the board. If you've got one handy, give it a go for us and report back if it works!
I tried compiling it for the teensy 2 but as you thought the joystick library is not compatible, I think its the PluggableUSB.h and DynamicHID.h that do not work with the teensy, shame!Probably? As long as they are fully supported in Arduino then it shouldn't be a problem I guess. The question really will be over the library that I've used and if it is compatible with the board. If you've got one handy, give it a go for us and report back if it works!
I did a quick google search and it does look like it wouldn't be hard to modify the code to work with a Teensy. This link gives a bit of an example: https://www.pjrc.com/teensy/td_joystick.htmlI tried compiling it for the teensy 2 but as you thought the joystick library is not compatible, I think its the PluggableUSB.h and DynamicHID.h that do not work with the teensy, shame!
I
if you wanted to modify your code I would be happy to test it out on the teensy 2 and ++?I did a quick google search and it does look like it wouldn't be hard to modify the code to work with a Teensy. This link gives a bit of an example: https://www.pjrc.com/teensy/td_joystick.html
Based on that link, I'm pretty sure all you'd need to do is comment out the joystick library and change the function calls for setting buttons and the POV hat. The calls to set joystick positions look like they would work just fine as is.
If I had one in front of me I'm sure I could have the code running on it in a couple of minutes.
if you wanted to modify your code I would be happy to test it out on the teensy 2 and ++?I did a quick google search and it does look like it wouldn't be hard to modify the code to work with a Teensy. This link gives a bit of an example: https://www.pjrc.com/teensy/td_joystick.html
Based on that link, I'm pretty sure all you'd need to do is comment out the joystick library and change the function calls for setting buttons and the POV hat. The calls to set joystick positions look like they would work just fine as is.
If I had one in front of me I'm sure I could have the code running on it in a couple of minutes.