1、文件-首选项-开发板添加网址:
2、在编辑器对应的库中添加文件夹DigisparkKeyboard: 3、工具-开发板-添加编辑器:找到对应的开发板,开发板的最后有个Diskpart(Default 16.5mhz) 4、工具-编程器:选择USBTinyISP
5、工具-开发板-开发板管理器,Digistump AVR Boards,选择安装。
6、安装驱动:DPinst64.exe
7、键入程序,编译上传: #include "DigiKeyboard.h" void setup() { }
void loop() { //put your main code here, to run repeatedly: DigiKeyboard.delay(1000); DigiKeyboard.sendKeyStroke(0); DigiKeyboard.delay(1000); DigiKeyboard.sendKeyStroke(0,MOD_GUI_LEFT); DigiKeyboard.delay(500); DigiKeyboard.print("cmd"); DigiKeyboard.delay(500); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.delay(5000); //进入命令行 }
|