Hey, I apologize in advance if my lingo is not up to par, I am very new to programming and my level of understand drivers or even how my mouse works after I plug it in is very limited so please bear with me.
I am working on my first teensy project. My goal is to make a switch panel for a flight simulator that works just like a joystick with a lot of buttons. The joystick feature that comes with the Teensyduino that I am currently using has 32 buttons, 6 axes, and 1 hat switch. This seems like a lot but I need more buttons. My question is this: Is there a way to customize the joystick so it has the maximum possible buttons and six separate axes? I don't need the hat switch at all. So far I have tried to work around this issue by treating the hat as eight different buttons but this has been causing some issues. By the way if it is possible to make a custom joystick driver or whatever for the teensy++ 2.0, does anyone know how many buttons I can make it have if I just want buttons and six separate axes?
Thank you for any help.
I don't think this is pertinent, but this is why I am not interested in using the hat feature. I'm using the simple button example that came with Teensyduino which uses the bounce function with rising and falling edge. The problem with the hat switch is I'm using mostly toggle and rotary switches so I want the teensy board to treat it like a pulse (instead of a constant on) by using the fallowing example:
// For a 5 position rotary switch that is using the 0°,45,90°,135,180° hat angles
Joystick.hat(0);
delay(200)
Joystick.hat(-1);
Joystick.hat(45);
delay(200)
Joystick.hat(-1);
Joystick.hat(90);
delay(200)
Joystick.hat(-1);
etc...
The problem is when my rotary switch goes to the button that is used for the 90° position it send a pulse to the 0° position first (I don't know why). I think the error has something to do with using -1 to reset the toggle but I am not sure. This is why I would like to remove the hat switch feature all together and just use joystick buttons.
I am working on my first teensy project. My goal is to make a switch panel for a flight simulator that works just like a joystick with a lot of buttons. The joystick feature that comes with the Teensyduino that I am currently using has 32 buttons, 6 axes, and 1 hat switch. This seems like a lot but I need more buttons. My question is this: Is there a way to customize the joystick so it has the maximum possible buttons and six separate axes? I don't need the hat switch at all. So far I have tried to work around this issue by treating the hat as eight different buttons but this has been causing some issues. By the way if it is possible to make a custom joystick driver or whatever for the teensy++ 2.0, does anyone know how many buttons I can make it have if I just want buttons and six separate axes?
Thank you for any help.
I don't think this is pertinent, but this is why I am not interested in using the hat feature. I'm using the simple button example that came with Teensyduino which uses the bounce function with rising and falling edge. The problem with the hat switch is I'm using mostly toggle and rotary switches so I want the teensy board to treat it like a pulse (instead of a constant on) by using the fallowing example:
// For a 5 position rotary switch that is using the 0°,45,90°,135,180° hat angles
Joystick.hat(0);
delay(200)
Joystick.hat(-1);
Joystick.hat(45);
delay(200)
Joystick.hat(-1);
Joystick.hat(90);
delay(200)
Joystick.hat(-1);
etc...
The problem is when my rotary switch goes to the button that is used for the 90° position it send a pulse to the 0° position first (I don't know why). I think the error has something to do with using -1 to reset the toggle but I am not sure. This is why I would like to remove the hat switch feature all together and just use joystick buttons.