PixArt Optical Track Sensor, OTS, demo program for P5101 sensor with OTS library v1.1. Imported and modified from P9130 demo program. Initial release v1.0.
Dependencies: Pixart_OTS
Fork of OTS_P5101_Demo by
Revision 6:935148896ccf, committed 2019-03-26
- Comitter:
- PixArtHC
- Date:
- Tue Mar 26 22:50:31 2019 +0000
- Parent:
- 5:1633d262b22f
- Commit message:
- PixArt Optical Track Sensor, OTS, demo program for P5101 sensor with OTS library v1.1. Imported and modified from P9130 demo program. Initial release v1.0.
Changed in this revision
Pixart_OTS.lib | 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 |
diff -r 1633d262b22f -r 935148896ccf Pixart_OTS.lib --- a/Pixart_OTS.lib Wed Mar 06 21:25:04 2019 +0000 +++ b/Pixart_OTS.lib Tue Mar 26 22:50:31 2019 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/PixArtHC/code/Pixart_OTS/#2a85075b8467 +https://os.mbed.com/users/PixArtHC/code/Pixart_OTS/#95917b856631
diff -r 1633d262b22f -r 935148896ccf main.cpp --- a/main.cpp Wed Mar 06 21:25:04 2019 +0000 +++ b/main.cpp Tue Mar 26 22:50:31 2019 +0000 @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -/* PAT9130EW: Optical Tracking Sensor. +/* PAA5101EW: Optical Tracking Sensor. * By PixArt Imaging Inc. * Primary Engineer: Hill Chen (PixArt USA) * @@ -11,7 +11,7 @@ */ /* Demo Code Revision History - * V1.0: March 6, 2019 + * V1.0: March 26, 2019 * First release. */ @@ -21,14 +21,15 @@ Serial pc(USBTX, USBRX); SPI spi(p23, p24, p25); //mosi, miso, sclk DigitalOut cs(p22); //chip select +DigitalOut ldp_enl_pin(p20);//laser diode control, low enable -static const Pixart_OTS_Model OTS_MODEL = PIXART_OTS_MODEL_9130; +static const Pixart_OTS_Model OTS_MODEL = PIXART_OTS_MODEL_5101; int main() { pc.baud(115200); - Pixart_OTS *pixart_ots = create_pixart_ots(OTS_MODEL, pc, spi, cs); + Pixart_OTS *pixart_ots = create_pixart_ots(OTS_MODEL, pc, spi, cs, ldp_enl_pin); if (!pixart_ots) {