Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can build in a work around with a little logic and a jumper wire or button. Start your code with something similar to this, which would block the HID behaviour, unless pin 10 is connected to GND. GND This already needs to be connected before powering up the Arduino in this example(or reseting).

Code Block
languagecpp
#define HIDdisablePin 10

void setup() {
  pinMode(HIDdisablePin, INPUT_PULLUP);
  // Disable the mouse Unless HIDdisablePin is connected to ground
    if(digitalRead(HIDdisablePin) == HIGH) {
         while(1) { /* infinite loop */ }
  }
  // The rest of your code after this line
  
  
  
}

void loop() {
 

}

...