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.
Fork of OFN by
Homepage
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.
|