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
display_service.cpp
- Committer:
- sigveseb
- Date:
- 2014-07-18
- Revision:
- 2:ea2c1ab55f20
- Parent:
- 0:7499fa0a8ecb
File content as of revision 2:ea2c1ab55f20:
#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 *));