Skip to content

Commit

Permalink
Fixed minor #define problems in example and changed baud rate
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoxer authored and kristopher committed Oct 20, 2009
1 parent 1c42ab8 commit ca4560c
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions examples/mouse.pde
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,29 @@
/**
* Reads X/Y values from a PS/2 mouse connected to an Arduino
* using the PS2Mouse library available from
* http://github.com/kristopher/PS2-Mouse-Arduino/
* Original by Kristopher Chambers <kristopher.chambers@gmail.com>
* Updated by Jonathan Oxer <jon@oxer.com.au>
*/

#include <PS2Mouse.h> #include <PS2Mouse.h>
#define MDATA 5 #define MOUSE_DATA 5
#define MCLK 6 #define MOUSE_CLOCK 6


PS2Mouse mouse_one(M1CLK, M1DATA, STREAM); PS2Mouse mouse(MOUSE_CLOCK, MOUSE_DATA, STREAM);


/**
* Setup
*/
void setup() void setup()
{ {
Serial.begin(115200); Serial.begin(38400);
mouse_one.initialize(); mouse.initialize();
} }


/**
* Main program loop
*/
void loop() void loop()
{ {
int data[2]; int data[2];
Expand Down

0 comments on commit ca4560c

Please sign in to comment.