Rotate the Cube Puck to invoke actions on your smartphone. Built on the Puck IOT platform.

Dependencies:   Puck MPU6050 mbed

The Cube Puck is an innovative bluetooth-enabled remote control device. It is a six-sided cube that can be rotated to any of its sides to invoke actions linked to that side. The cube puck is completely customizable and therefore also quite versatile.

A tutorial for the Cube Puck is available on GitHub.

Tutorials 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:
cristea
Date:
Tue Aug 05 08:53:18 2014 +0000
Parent:
5:4c374f1f5df2
Child:
7:4244572015c6
Commit message:
Add license

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
--- a/Puck.lib	Fri Jul 25 09:08:11 2014 +0000
+++ b/Puck.lib	Tue Aug 05 08:53:18 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Nordic-Pucks/code/Puck/#c07c01c2a741
+http://mbed.org/teams/Nordic-Pucks/code/Puck/#8a8cc109f048
--- a/main.cpp	Fri Jul 25 09:08:11 2014 +0000
+++ b/main.cpp	Tue Aug 05 08:53:18 2014 +0000
@@ -1,7 +1,22 @@
+/**
+ * Copyright 2014 Nordic Semiconductor
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
 #include "MPU6050.h"
 #include <math.h>
 
-#define LOG_LEVEL_INFO
 #include "Puck.h"
 
 Puck* puck = &Puck::getPuck();
@@ -111,11 +126,11 @@
         characteristicValueLength,
         GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);
     
-    puck->init(0xC0BE);
+    puck->init(0xC1BE);
     
     
     Ticker ticker;
-    ticker.attach(updateCubeDirection, 1);
+    ticker.attach(updateCubeDirection, 0.2);
     LOG_INFO("Started listening to orientation changes.\n");
 
     while(puck->drive());