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: MAX44000 nexpaq_mdk
Fork of ALS_Prox_Demo by
Diff: main.cpp
- Revision:
- 10:a81682ee3e73
- Parent:
- 9:b7cf4b7fd770
diff -r b7cf4b7fd770 -r a81682ee3e73 main.cpp
--- a/main.cpp Sat Oct 15 19:07:22 2016 +0000
+++ b/main.cpp Wed Oct 19 00:58:53 2016 +0000
@@ -12,7 +12,7 @@
#define FUNCTION_TABLE_NUM 2
#define UUID_NUM 16 // UUID number is 16, don't change it
#define LOOP_DELAY 100
-#define PROX_THRESHOLD 50
+#define PROX_THRESHOLD 10
#define ALS_INTERVAL 10 // about once per second
/***** Globals *****/
@@ -65,7 +65,7 @@
if ( np_api_register((MDK_REGISTER_CMD*)my_cmd_func_table, FUNCTION_TABLE_NUM) == MDK_REGISTER_FAILD ) {
// Register failed handle code
}
- max44000.init(MAX44000::MODE_ALS_PROX, MAX44000::ALSTIM_64X, MAX44000::ALSPGA_1X, MAX44000::DRV_110);
+ max44000.init(MAX44000::MODE_ALS_PROX, MAX44000::ALSTIM_64X, MAX44000::ALSPGA_1X, MAX44000::DRV_10);
ledR = 1.0f;
ledG = 1.0f;
ledB = 1.0f;
