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
gatt_service.cpp
- Committer:
- aleksanb
- Date:
- 2014-07-09
- Revision:
- 2:b9b42ff80e9a
- Parent:
- 0:449ee9595cf6
File content as of revision 2:b9b42ff80e9a:
#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 *));