#include "KeyboardioHID.h" void setup() { // This is one endpoint Serial.begin(9600); // This is a second endpoint BootKeyboard.begin(); // This is a third endpoint SingleAbsoluteMouse.begin(); // This is a fourth endpoint Mouse.begin(); ConsumerControl.begin(); SystemControl.begin(); Keyboard.begin(); pinMode(LED2, OUTPUT); Serial1.begin(115200); Serial1.println("-- Blink demo --"); while (!Serial) { digitalWrite(LED2, HIGH); delay(100); digitalWrite(LED2, LOW); delay(100); }; Serial.println("cdc acm"); } void loop() { Serial1.println("On"); digitalWrite(LED2, HIGH); delay(500); Serial.print("."); if (Serial.available()) { char c = Serial.read(); Serial.print(c); } BootKeyboard.press(HID_KEYBOARD_A_AND_A); BootKeyboard.sendReport(); BootKeyboard.releaseAll(); BootKeyboard.sendReport(); Keyboard.press(HID_KEYBOARD_A_AND_A); Keyboard.sendReport(); Keyboard.releaseAll(); Keyboard.sendReport(); Mouse.move(10, 0); Mouse.sendReport(); Mouse.releaseAll(); Mouse.sendReport(); SingleAbsoluteMouse.click(); ConsumerControl.write(HID_CONSUMER_PLAY_SLASH_PAUSE); SystemControl.write(HID_SYSTEM_WAKE_UP); Serial1.println("Off"); digitalWrite(LED2, LOW); // Delay long enough to see the mouse move. delay(500); }