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
Diff: gatt_service.cpp
- Revision:
- 3:6a7310ea51f7
- Parent:
- 2:b9b42ff80e9a
- Child:
- 4:6a2b306b6b41
--- a/gatt_service.cpp Wed Jul 09 15:02:59 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -#include "BLEDevice.h" - -uint8_t uuid_array_service[16] = {'b', 'f', 't', 'j', ' ', 'c', 'u', 'b', 'e', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; -uint8_t uuid_array_direction[16] = {'b', 'f', 't', 'j', ' ', 'c', 'u', 'b', 'e', ' ', 'd', 'i', 'r', 'c', 't', 'n' }; - -const UUID uuid_service = UUID(uuid_array_service); -const UUID uuid_direction = UUID(uuid_array_direction); - -uint8_t direction_data[1] = {6}; - -GattCharacteristic directionCharacteristic( - uuid_direction, - direction_data, - sizeof(direction_data), - sizeof(direction_data), - GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ - | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY); - -GattCharacteristic *characteristics[] = {&directionCharacteristic}; -GattService cube_service(uuid_service, - characteristics, - sizeof(characteristics) / sizeof(GattCharacteristic *)); -