아두이노 레오나르도 r3 코딩 전환 변환 파이썬 전자 신호 기계적 신호
ㄴ Arduino IDE ㅡ>>>>> https://www.arduino.cc/en/software/ 아두이노 레오나르도 r3 #include "Keyboard.h" struct MacroStep { char key; float min Delay; float maxDelay; bool active; }; MacroStep steps[10]; bool isRunning = false; void setup() { Serial.begin(9600); Keyboard.begin(); } void loop() { // 1. PC로부터 데이터 수신 (간단한 파싱 로직) if (Serial.available() > 0) { String command = Serial.readStringUntil('\n'); if (command.startsWith("START")) { isRunning = true; } else if (command.startsWith("STOP")) { isRunning = false; Keyboard.releaseAll(); } else if (command.startsWith("SET")) { // 데이터 형식: SET,인덱스,키값,최소지연,최대지연,활성화여부 // 예: SET,0,a,1.1,7.0,1 parseCommand(command); } } // 2. 매크로 실행 루프 if (isRunni...