main.cpp
unknown
c_cpp
2 years ago
835 B
7
Indexable
#include <Arduino.h>
#define IRMP_PROTOCOL_NAMES 1
#define IRMP_SUPPORT_NEC_PROTOCOL 1
#define IRMP_INPUT_PIN 2
//#define DEBUG
#include <irmp.hpp>
IRMP_DATA irmp_data;
#define BUTTON_LENGTH 8 // @todo not working for no reason broken
#include <Macro.h>
#include <Scripts.h>
byte buttonStates = 0;
void setup() {
#ifdef DEBUG
Serial.begin(115200);
while (!Serial) {;}
Serial.println("Starting...");
#endif
irmp_init();
registerRepeatedMacro<RandomMouseMoveData>(moveMouseRandomly, 0);
registerRepeatedMacro<RandomMouseMoveData>(moveMouseRandomly, 4);
//registerNormalMacro(remoteDesktop, 4);
setupScripts();
}
void loop() {
if (irmp_get_data(&irmp_data)) {
buttonStates = irmp_data.command;
}
updateMacros(buttonStates);
}Editor is loading...
Leave a Comment