BLE-writeable Display Puck with an e-paper display. Built on the Puck IOT platform.
Dependencies: Puck lz mbed seeedstudio-epaper
The Display puck is a puck with an e-paper display that can show arbitrary black and white images received over Bluetooth LE.
A tutorial for the Display Puck is available on GitHub.
Tutorials and in-depth documentation for the Puck platform is available at the project's GitHub page
Diff: display_service.cpp
- Revision:
- 3:4ff226c4fe2a
- Parent:
- 2:ea2c1ab55f20
- Child:
- 4:cfb711a2c71f
--- a/display_service.cpp Fri Jul 18 09:22:36 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#include "BLEDevice.h" - -uint8_t uuid_array_service[16] = {'b', 'f', 't', 'j', ' ', 'd', 'i', 's', 'p', 'l', 'a', 'y', ' ', ' ', ' ', ' '}; -uint8_t uuid_array_command[16] = {'b', 'f', 't', 'j', ' ', 'd', 'i', 's', 'p', 'l', 'a', 'y', ' ', 'c', 'o', 'm'}; -uint8_t uuid_array_data[16] = {'b', 'f', 't', 'j', ' ', 'd', 'i', 's', 'p', 'l', 'a', 'y', ' ', 'd', 'a', 't'}; - -const UUID uuid_service = UUID(uuid_array_service); -const UUID uuid_command = UUID(uuid_array_command); -const UUID uuid_data = UUID(uuid_array_data); - -uint8_t command_data[1]; -uint16_t command_data_length = 1; -uint8_t data_data[20]; -uint16_t data_data_length = 20; - -GattCharacteristic command = GattCharacteristic(uuid_command, command_data, sizeof(command_data), sizeof(command_data), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ); -GattCharacteristic data = GattCharacteristic(uuid_data, data_data, sizeof(data_data), sizeof(data_data), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ); - -GattCharacteristic *characteristics[] = {&command, &data}; -GattService display_service = GattService(uuid_service, characteristics, sizeof(characteristics) / sizeof(GattCharacteristic *)); \ No newline at end of file