Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Pixart_OTS
Fork of OTS_P5101_Demo by
Revision 0:79d6b8ec630c, committed 2019-02-26
- Comitter:
- PixArtHC
- Date:
- Tue Feb 26 19:04:53 2019 +0000
- Child:
- 1:4c9b5b2f001e
- Commit message:
- PixArt Optical Finger Navigation, OFN, demo program for PAW3007 sensor with library. Initial release v1.0.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.gitignore Tue Feb 26 19:04:53 2019 +0000 @@ -0,0 +1,4 @@ +.build +.mbed +projectfiles +*.py*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Pixart_OFN.lib Tue Feb 26 19:04:53 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/PixArtHC/code/Pixart_OFN/#a4065043fd57
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Feb 26 19:04:53 2019 +0000
@@ -0,0 +1,41 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2018 ARM Limited
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/* ADBM-A350: Finger navigation chip.
+ * By PixArt Imaging Inc.
+ * Primary Engineer: Hill Chen (PixArt USA)
+ *
+ * License: Apache-2.0; http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+/* Revision History
+ * V1.0: February 25, 2019
+ * First release.
+ */
+
+
+#include "mbed.h"
+#include "Pixart_OFN.h"
+
+Serial pc(USBTX, USBRX);
+I2C i2c(I2C_SDA0, I2C_SCL0);
+
+// main() runs in its own thread in the OS
+int main()
+{
+ bool Result = false;
+ Pixart_OFN *m_Sensor = new Pixart_OFN(&i2c, &pc, 0.25f, Result);
+ if(Result) pc.printf("\r\n\n %s %s initialization successfully\r\n", PRODUCT, MODEL);
+ else{ pc.printf("\r\n\n %s %s fail on initialization", PRODUCT, MODEL);
+ while (true) ;
+ }
+
+ while (true){
+#ifndef USE_CALLBACK
+ m_Sensor->periodicCallback();
+ wait_ms(250);
+#endif
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Tue Feb 26 19:04:53 2019 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#bc132a6066cafdb9e4028251b5aff7cfcbcaa444
