Example Puck (BLE)

Dependencies:   Puck mbed

The example puck will give your smartphone context about its whereabouts, as well as set up a simple Gatt characteristic. You can later set up rules for what should happen at different locations in the smartphone companion application (Puck Central).

Tutorials for the different Pucks (location, cube, IR) and in-depth documentation for the Puck platform is available at the project's GitHub page

Files at this revision

API Documentation at this revision

Comitter:
aleksanb
Date:
Mon Mar 09 13:41:03 2015 +0000
Parent:
3:76ff01e97555
Commit message:
Add power usage note, update puck lib dependency.

Changed in this revision

Puck.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 76ff01e97555 -r 552bda03c07a Puck.lib
--- a/Puck.lib	Tue Mar 03 23:55:24 2015 +0000
+++ b/Puck.lib	Mon Mar 09 13:41:03 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Nordic-Pucks/code/Puck/#7d728fed55ab
+http://developer.mbed.org/teams/Nordic-Pucks/code/Puck/#cd6703df9501
diff -r 76ff01e97555 -r 552bda03c07a main.cpp
--- a/main.cpp	Tue Mar 03 23:55:24 2015 +0000
+++ b/main.cpp	Mon Mar 09 13:41:03 2015 +0000
@@ -15,13 +15,22 @@
  */
 
 #define LOG_LEVEL_INFO
+
+/**
+ * Warning: remove LOG_LEVEL_* defines in production for major power savings.
+ *
+ * Defining a log level will set up a serial connection to use for logging.
+ * This serial connection sets up a timer prohibiting the mbed chip
+ * from entering low power states, drawing ~1.4mAh instead of ~20µAh with logging disabled.
+ */
+
 #include "Puck.h"
 
 Puck* puck = &Puck::getPuck();
 
 // Sample Gatt characteristic and service UUIDs
-const UUID SAMPLE_GATT_SERVICE = stringToUUID("bftj sample     ");
-const UUID SAMPLE_GATT_CHARACTERISTIC = stringToUUID("bftj sample char");
+const UUID SAMPLE_GATT_SERVICE = stringToUUID("bftj http post  ");
+const UUID SAMPLE_GATT_CHARACTERISTIC = stringToUUID("bftj post body  ");
 
 int main(void) {
     // Add the Gatt characteristic