Hi everybody.
There is an issue with the standard sketch of Serial/keyboard/Mouse/Joystick in Windows 10.
Appareantly, last update (KB4041676) makes that power saveR of windows manages the mouse usb (of this joystick), so in a few minutes, the buttons of joysticks don't work.
One friend told me that UNCHECKING the option of "Energy saver" in devices manager/usb, Uninstalling the device (manually) and installing again, it could work.
Any idea?
Any option for DISABLING THE MOUSE MODE in the sketch or USB files in order to Windows doesn't manage the energy saver?
Thanks in advance.
There is an issue with the standard sketch of Serial/keyboard/Mouse/Joystick in Windows 10.
Appareantly, last update (KB4041676) makes that power saveR of windows manages the mouse usb (of this joystick), so in a few minutes, the buttons of joysticks don't work.
One friend told me that UNCHECKING the option of "Energy saver" in devices manager/usb, Uninstalling the device (manually) and installing again, it could work.
Any idea?
Any option for DISABLING THE MOUSE MODE in the sketch or USB files in order to Windows doesn't manage the energy saver?
Thanks in advance.
Code:
File > Examples > Teensy > USB_Joystick > Basic.
/* Basic USB Joystick Example
Teensy becomes a USB joystick
You must select Joystick from the "Tools > USB Type" menu
Pushbuttons should be connected to digital pins 0 and 1.
Wire each button between the digital pin and ground.
Potentiometers should be connected to analog inputs 0 to 1.
This example code is in the public domain.
*/
void setup() {
pinMode(0, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
}
void loop() {
// read analog inputs and set X-Y position
Joystick.X(analogRead(0));
Joystick.Y(analogRead(1));
// read the digital inputs and set the buttons
Joystick.button(1, digitalRead(0));
Joystick.button(2, digitalRead(1));
// a brief delay, so this runs 20 times per second
delay(50);
}
Last edited: