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

Revision:
6:4f2aaa06ff44
Parent:
4:6a2b306b6b41
Child:
7:4244572015c6
diff -r 4c374f1f5df2 -r 4f2aaa06ff44 main.cpp
--- 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());