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

Committer:
aleksanb
Date:
Thu Jul 03 11:25:12 2014 +0000
Revision:
0:449ee9595cf6
Child:
2:b9b42ff80e9a
Initial commit.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aleksanb 0:449ee9595cf6 1 #include "BLEDevice.h"
aleksanb 0:449ee9595cf6 2
aleksanb 0:449ee9595cf6 3 uint8_t uuid_array_service[16] = {'b', 'f', 't', 'j', ' ', 'c', 'u', 'b', 'e', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
aleksanb 0:449ee9595cf6 4 uint8_t uuid_array_direction[16] = {'b', 'f', 't', 'j', ' ', 'c', 'u', 'b', 'e', ' ', 'd', 'i', 'r', 'c', 't', 'n' };
aleksanb 0:449ee9595cf6 5
aleksanb 0:449ee9595cf6 6 const UUID uuid_service = UUID(uuid_array_service);
aleksanb 0:449ee9595cf6 7 const UUID uuid_direction = UUID(uuid_array_direction);
aleksanb 0:449ee9595cf6 8
aleksanb 0:449ee9595cf6 9 uint8_t direction_data[1] = {6};
aleksanb 0:449ee9595cf6 10
aleksanb 0:449ee9595cf6 11 GattCharacteristic directionCharacteristic(
aleksanb 0:449ee9595cf6 12 uuid_direction,
aleksanb 0:449ee9595cf6 13 direction_data,
aleksanb 0:449ee9595cf6 14 sizeof(direction_data),
aleksanb 0:449ee9595cf6 15 sizeof(direction_data),
aleksanb 0:449ee9595cf6 16 GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ);
aleksanb 0:449ee9595cf6 17
aleksanb 0:449ee9595cf6 18 GattCharacteristic *characteristics[] = {&directionCharacteristic};
aleksanb 0:449ee9595cf6 19 GattService cube_service(uuid_service,
aleksanb 0:449ee9595cf6 20 characteristics,
aleksanb 0:449ee9595cf6 21 sizeof(characteristics) / sizeof(GattCharacteristic *));
aleksanb 0:449ee9595cf6 22