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.
Diff: lib.cpp
- Revision:
- 4:9fbefd153e3e
- Parent:
- 3:83415d375d36
- Child:
- 5:562b8d04dfd4
diff -r 83415d375d36 -r 9fbefd153e3e lib.cpp
--- a/lib.cpp Mon Apr 25 00:50:42 2016 +0000
+++ b/lib.cpp Mon Apr 25 00:52:10 2016 +0000
@@ -88,3 +88,28 @@
if (temp == SUCCESS) return true;
else return false;
}
+
+bool face_detect(char *user_id, Serial *android)
+{
+ char CMD[] = {
+ CMD_AUTH,
+ 0x02,
+ 0x04,
+ 0x01,
+ user_id[0],
+ user_id[1],
+ user_id[2],
+ user_id[3],
+ FACE_FID,
+ '\0'
+ };
+
+ for (int i = 0; i < sizeof(CMD)/ sizeof(char); i++) {
+ android->putc(CMD[i]);
+ }
+
+ while (!android->readable());
+ char temp = android->getc();
+ if (temp == SUCCESS) return true;
+ else return false;
+}
\ No newline at end of file