loading

arduino interfacing with ps2 keyboard

Simple_Testmodify.cpp: In function 'void setup()':
Simple_Testmodify:34: error: no matching function for call to 'PS2Keyboard::begin(int&, int&)'
C:\Program Files\arduino-1.0\libraries\PS2Keyboard_014A/PS2Keyboard.h:77: note: candidates are: void PS2Keyboard::begin(int)
Simple_Testmodify.cpp: In function 'void loop()':
Simple_Testmodify:52: error: 'begin' was not declared in this scope
THE ABOVE ERROR WAS SHOWN ON VERIFICATION OF THE PROGRAM
KINDLY ADVICE




THIS WAS THE CODE I USED TO INTER FACE PS2 KEYBOARD WITH ARDUINO UNO 

#include <PS2Keyboard.h>

int DataPin = 8;
int IRQpin =  3;

PS2Keyboard keyboard;

void setup() {
  delay(1000);
  keyboard.begin(DataPin,IRQpin);
  Serial.begin(9600);
  Serial.println("Keyboard Test:");
}

void loop() {
  if (keyboard.available()) {
    char PS2_ENTER;
    char PS2_TAB;
    char PS2_ESC;
    char PS2_PAGEDOWN;
    char PS2_PAGEUP;
    char PS2_LEFTARROW;
    char PS2_RIGHTARROW;
    char PS2_UPARROW;
    char PS2_DOWNARROW;
    char PS2_DELETE;
    // read the next key
  
    char c = keyboard.read();
   
    // check for some of the special keys
    if (c == PS2_ENTER) {
      Serial.println();
    } else if (c == PS2_TAB) {
      Serial.print("[Tab]");
    } else if (c == PS2_ESC) {
      Serial.print("[ESC]");
    } else if (c == PS2_PAGEDOWN) {
      Serial.print("[PgDn]");
    } else if (c == PS2_PAGEUP) {
      Serial.print("[PgUp]");
    } else if (c == PS2_LEFTARROW) {
      Serial.print("[Left]");
    } else if (c == PS2_RIGHTARROW) {
      Serial.print("[Right]");
    } else if (c == PS2_UPARROW) {
      Serial.print("[Up]");
    } else if (c == PS2_DOWNARROW) {
      Serial.print("[Down]");
    } else if (c == PS2_DELETE) {
      Serial.print("[Del]");
    } else {
     
      // otherwise, just print all normal characters
      Serial.print(c);
    }
  }
}


caitlinsdad5 years ago
from http://www.arduino.cc/playground/Main/PS2Keyboard, looks like intIRQpin is not used and should not be in the function call.