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

Revision:
10:5650885bd825
Parent:
5:5491fb58107e
Child:
11:c6ae6aeb65f9
--- a/main.cpp	Fri Aug 08 10:59:20 2014 +0000
+++ b/main.cpp	Sun Mar 01 23:51:01 2015 +0000
@@ -3,7 +3,7 @@
 #include "lz.h"
 
 
-#define LOG_LEVEL_VERBOSE
+#define LOG_LEVEL_ERROR
 #include "Puck.h"
 
 int receiveIndex = 0;
@@ -75,7 +75,7 @@
 }
 
 
-void onCommandWritten(uint8_t* value) {
+void onCommandWritten(const uint8_t* value, uint8_t length) {
     currentCommand = value[0];
     LOG_DEBUG("Received command: %i.\n", currentCommand);
     
@@ -122,9 +122,9 @@
     currentCommand = COMMAND_NOOP;
 }
 
-void onDataWritten(uint8_t* value) {
+void onDataWritten(const uint8_t* value, uint8_t length) {
     LOG_VERBOSE("Data written, receiveIndex: %i\n", receiveIndex);
-    for(int i = 0; i < 20 && receiveIndex > 0; i++) {
+    for(int i = 0; i < length && receiveIndex > 0; i++) {
         buffer[--receiveIndex] = value[i];
     }
 }