Reference firmware for PixArt's PAT9125EL sensor and evaluation board. "Hello World" and "Library" contain the exact same files. Please import just one of the two into your mBed compiler as a new program and not as a library.

Welcome to the code repository for PixArt's PAT9125EL sensor and evaluation board.

For general information about this product, please visit this product's components page here:
https://os.mbed.com/components/PAT9125EL-Evaluation-Board/

For guides and tips on how to setup and evaluate the PAT9125EL sensor with the Nordic nRF52-DK microcontroller using this reference code, please visit this guide:
https://os.mbed.com/teams/PixArt/code/9125_referenceCode/wiki/Guide-for-nRF52-DK-Platform

For guides and tips on how to setup and evaluate the PAT9125EL sensor with any microcontroller using this reference code, please visit this guide:
https://os.mbed.com/teams/PixArt/code/9125_referenceCode/wiki/Guide-for-Any-Platform

Files at this revision

API Documentation at this revision

Comitter:
PixArtVY
Date:
Wed Jul 18 18:33:38 2018 +0000
Parent:
2:bebddee7347e
Child:
4:8f7d8ff001f8
Commit message:
Added Apache License notice.

Changed in this revision

commHeaders/I2CcommFunctions.h Show annotated file Show diff for this revision Revisions of this file
commHeaders/SPIcommFunctions.h Show annotated file Show diff for this revision Revisions of this file
commHeaders/registerArrays.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/commHeaders/I2CcommFunctions.h	Wed Feb 28 21:25:38 2018 +0000
+++ b/commHeaders/I2CcommFunctions.h	Wed Jul 18 18:33:38 2018 +0000
@@ -103,7 +103,7 @@
         totalY += deltaY;
         
         pc.printf("deltaX: %d\t\t\tdeltaY: %d\n\r", deltaX, deltaY);    //Prints each individual count of deltaX and deltaY.
-        pc.printf("X-axis Counts: %d\t\t\tY-axis Counts: %d\n\r", totalX, totalY);  //Prints the total movement made during runtime.
+        pc.printf("X-axis Counts: %d\t\tY-axis Counts: %d\n\r", totalX, totalY);  //Prints the total movement made during runtime.
     }
     
     deltaX = 0;                             //Resets deltaX and Y values to zero, otherwise previous data is stored until overwritten.
--- a/commHeaders/SPIcommFunctions.h	Wed Feb 28 21:25:38 2018 +0000
+++ b/commHeaders/SPIcommFunctions.h	Wed Jul 18 18:33:38 2018 +0000
@@ -106,7 +106,7 @@
         totalY += deltaY;
         
         pc.printf("deltaX: %d\t\t\tdeltaY: %d\n\r", deltaX, deltaY);    //Prints each individual count of deltaX and deltaY.
-        pc.printf("X-axis Counts: %d\t\t\tY-axis Counts: %d\n\r", totalX, totalY);  //Prints the total movement made during runtime.
+        pc.printf("X-axis Counts: %d\t\tY-axis Counts: %d\n\r", totalX, totalY);  //Prints the total movement made during runtime.
     }
     
     deltaX = 0;                             //Resets deltaX and Y values to zero, otherwise previous data is stored until overwritten.
--- a/commHeaders/registerArrays.h	Wed Feb 28 21:25:38 2018 +0000
+++ b/commHeaders/registerArrays.h	Wed Jul 18 18:33:38 2018 +0000
@@ -2,7 +2,7 @@
     { 0x09, 0x5A },     //Disables write-protect.
     { 0x0D, 0xB5 },     //Sets X-axis resolution (necessary value here will depend on physical design and application).
     { 0x0E, 0xFF },     //Sets Y-axis resolution (necessary value here will depend on physical design and application).
-    { 0x19, 0x04 },     //Sets 12-bit X/Y data format. 0x04 is default (neither axis inverted, using 12-bit data instead of 8-bit data).
+    { 0x19, 0x04 },     //Sets 12-bit X/Y data format.
     //{ 0x4B, 0x04 },     //Needed for when using low-voltage rail (1.7-1.9V): Power saving configuration.
 };
 #define initialize_size (sizeof(initialize)/sizeof(initialize[0]))
--- a/main.cpp	Wed Feb 28 21:25:38 2018 +0000
+++ b/main.cpp	Wed Jul 18 18:33:38 2018 +0000
@@ -1,21 +1,29 @@
 // PAT9125EL: Miniature Optical Navigation Chip reference code.
-// Version: 1.0
-// Latest Revision Date: 16 Feb. 2018
+// Version: 1.1
+// Latest Revision Date: 18 July 2018
 // By PixArt Imaging Inc.
 // Primary Engineer: Vincent Yeh (PixArt USA)
 
+// Copyright [2018] [Vincent Yeh]
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
+// http://www.apache.org/licenses/LICENSE-2.0
+
+
 /*
 //=======================
 //Revision History
 //=======================
+Version 1.1 -- 18 July 2018
+Added apache license notice.
+
 Version 1.0 -- 16 Feb. 2018
 First release.
 */
 
 #include "mbed.h"
 #include "registerArrays.h"
-//#include "SPIcommFunctions.h"
-#include "I2CcommFunctions.h"
+#include "SPIcommFunctions.h"
+//#include "I2CcommFunctions.h"
 //Make sure you only have SPIcommFunctions or I2CcommFunctions enabled. You cannot include both headers.
 
 int main()