I am trying to read a PS2 mouse movements with arduino.
But I discovered that PS2Mouse initialization breaks serial monitor output (no output at all)
This is the code that produces the behaviour:
#include <PS2Mouse.h>
#define MOUSE_DATA 5
#define MOUSE_CLOCK 6
PS2Mouse mouse(MOUSE_CLOCK, MOUSE_DATA, STREAM);
void setup() {
Serial.begin(9600);
mouse.initialize();
}
void loop() {
Serial.println("A");
}
The "A" is never shown in Serial monitor. But if I remove the following line:
mouse.initialize();
then serial monitor backs to life...
What can be wrong?