Skip to content

Commit e3ba33f

Browse files
authored
Merge pull request #1 from styropyr0/release-v1.0.1
Added examples
2 parents c3d53c7 + 0b44130 commit e3ba33f

File tree

5 files changed

+64
-1
lines changed

5 files changed

+64
-1
lines changed

examples/DPI/DPI.ino

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "mx8650.h"
2+
3+
// SCLK: 13, SDIO: 11
4+
MX8650 mouseController(13, 11);
5+
6+
void setup()
7+
{
8+
Serial.begin(9600);
9+
Serial.println("Initializing MX8650...");
10+
}
11+
12+
void loop()
13+
{
14+
mouseController.setDPI(DPI_1600);
15+
Serial.println("DPI in use: " + mouseController.getDPI());
16+
}

examples/Log/Log.ino

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "mx8650.h"
2+
3+
// SCLK: 13, SDIO: 11
4+
MX8650 mouseController(13, 11);
5+
6+
void setup()
7+
{
8+
Serial.begin(9600);
9+
Serial.println("Initializing MX8650...");
10+
}
11+
12+
void loop()
13+
{
14+
mouseController.Log();
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "mx8650.h"
2+
3+
// SCLK: 13, SDIO: 11
4+
MX8650 mouseController(13, 11);
5+
6+
void setup()
7+
{
8+
Serial.begin(9600);
9+
Serial.println("Initializing MX8650...");
10+
}
11+
12+
void loop()
13+
{
14+
Serial.println("Motion Status: " + mouseController.getMotionStatus());
15+
Serial.print("Delta X: " + mouseController.getDeltaX() + "\t");
16+
Serial.println("Delta Y: " + mouseController.getDeltaY());
17+
}

examples/PID/PID.ino

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "mx8650.h"
2+
3+
// SCLK: 13, SDIO: 11
4+
MX8650 mouseController(13, 11);
5+
6+
void setup()
7+
{
8+
Serial.begin(9600);
9+
Serial.println("Initializing MX8650...");
10+
}
11+
12+
void loop()
13+
{
14+
Serial.println("PID: " + mouseController.getPID());
15+
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=MX8650 Mouse sensor library
2-
version=1.0.0
2+
version=1.0.1
33
author=Saurav Sajeev
44
maintainer=Saurav Sajeev
55
sentence=Library to facilitate communication with the MX8650 mouse sensor, read/write from/to its internal registers.

0 commit comments

Comments
 (0)