enigma/code.c.ino

26 lines
420 B
C++

#include <PS2KeyAdvanced.h>
#include "enigma_types.h"
#define DATAPIN 2
#define IRQPIN 3
PS2KeyAdvanced keyboard;
void setup()
{
keyboard.begin(DATAPIN, IRQPIN);
Serial.begin(115200);
}
void loop()
{
if (keyboard.available())
{
const uint16_t key = keyboard.read();
if (key > 0)
{
const String value = String(key, HEX);
}
}
}