Paso 3: código
Primero incluye esta biblioteca a Arduino (Sketch > Añadir archivo) < PS2Keyboard.h >
<p>#include < PS2Keyboard.h><br>const int DataPin = 8; const int IRQpin = 3; char c; PS2Keyboard keyboard; int led = 9; // the pin that the LED is attached to void setup() { delay(1000); keyboard.begin(DataPin, IRQpin); pinMode(led, OUTPUT); } void loop() { { if (keyboard.available()) { c = keyboard.read()*25; analogWrite(led, c); } }}</p>