Version 1.0 - Library for Parallax OFN module 27903

Fork of OFN by Neha Kadam

Import library

Public Member Functions

OFN (PinName sda, PinName scl)
Constructor.
bool checkMotion ()
Function to check if motion has been detected Checks the 7th bit of MOTION register and Returns true if motion detected else returns false.
int readX ()
Function to get displacement in the X direction Returns an integer value.
int readY ()
Function to get displacement in the X direction Returns an integer value.
int readOrientation ()
Function to read the Orientation register Returns an integer value 1 - default orientation 0 - rotated by 90 degrees.

Files at this revision

API Documentation at this revision

Comitter:
nkadam
Date:
Mon Mar 09 04:02:49 2015 +0000
Parent:
1:ba28114bd6bb
Commit message:
ver 1.0;

Changed in this revision

ofn.h Show annotated file Show diff for this revision Revisions of this file
diff -r ba28114bd6bb -r 757ad351c8c6 ofn.h
--- a/ofn.h	Mon Mar 09 03:58:38 2015 +0000
+++ b/ofn.h	Mon Mar 09 04:02:49 2015 +0000
@@ -1,4 +1,29 @@
 
+//@Authors: Guru Das Srinagesh, Neha Kadam
+/* Copyright (c) March, 2015 MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
+ * and associated documentation files (the "Software"), to deal in the Software without restriction, 
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or 
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*
+ * Library for Parallax Optical Finger Navigation Module 27903
+ * Link to datasheet: http://www.parallax.com/sites/default/files/downloads/27903-OFN-Module-Documentation-v1.1.pdf
+ *
+ */
 #ifndef OFN_H
 #define OFN_H
 
@@ -13,7 +38,10 @@
 
 #define ORIENT_DEFAULT 1
 #define ORIENT_ROTATED_CLKWISE 0
-
+/**
+* Class for the Parallax OFN module 27903
+*
+*/
 class OFN {
     
     public: