Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 1 of 1

Thread: Joystick Teensy with problems in last update of Widows 10

Hybrid View

  1. #1
    Member
    Join Date
    Mar 2014
    Location
    Valencia
    Posts
    58

    Joystick Teensy with problems in last update of Widows 10

    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.

    Click image for larger version. 

Name:	image34.png 
Views:	102 
Size:	8.5 KB 
ID:	11813

    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 by carcaes1; 10-19-2017 at 01:05 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •