Reference firmware for PixArt's PAA5101 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 PAA5101 sensor and evaluation board.

For general information about this product, please visit this product's components page here:
https://os.mbed.com/components/PAA5101-Floor-Tracking-Sensor-with-Wide-/

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

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

Files at this revision

API Documentation at this revision

Comitter:
PixArtVY
Date:
Fri Jun 01 21:37:39 2018 +0000
Parent:
1:469063631a05
Child:
3:1d5c2956f415
Commit message:
Removed some unnecessary variables.

Changed in this revision

commHeaders/SPIcommFunctions.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/SPIcommFunctions.h	Tue May 01 22:45:34 2018 +0000
+++ b/commHeaders/SPIcommFunctions.h	Fri Jun 01 21:37:39 2018 +0000
@@ -16,7 +16,6 @@
 uint8_t frameCounter = 0;                           //Looping variable to track when we have grabbed 8 frames of data.
 uint16_t imageQuality[8];                           //Stores 8 frames of image data to determine when quality changes to a point where we need to switch modes (LED/laser).
 uint16_t imageQuality_total = 0;                    //Stores the sum of all raw values from the 8 frames from imageQuality[8].
-uint8_t imageQualityOK = 0;
 uint8_t mode = 0;                                   //Modes: 0 = Laser, 1 = LED.    Laser is default.
 #define laser2LED_threshold 0x700                   //Stores threshold level for when we need to swap to LED mode.
 #define LED2laser_threshold 0x500                   //Stores threshold level for when we need to swap to laser mode.
--- a/main.cpp	Tue May 01 22:45:34 2018 +0000
+++ b/main.cpp	Fri Jun 01 21:37:39 2018 +0000
@@ -66,7 +66,7 @@
     {   
         checkMode();                    //Checks image quality and switches to laser or LED mode accordingly.
         
-        if(imageQualityOK && readRegister(0x02) & 0x80)   //If motion bit (bit 7 of register 0x02) is 1, movement has been detected. Also checks if imageQuality is good enough.
+        if(readRegister(0x02) & 0x80)   //If motion bit (bit 7 of register 0x02) is 1, movement has been detected.
         {
             grabData();                 //Grabs data into variables deltaX and deltaY.
             printData();                //Prints deltaX and deltaY, but only if they have changed from their previous values.