Example code for the EM027BS013 ePaper display module.

Dependencies:   EM027BS013 mbed

Revision:
0:02968930216b
Child:
1:6530f3df6024
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jul 22 12:02:06 2014 +0000
@@ -0,0 +1,60 @@
+#include "mbed.h"
+#include "EM027BS013.h"
+#include "image_data.h"
+
+/* The following macros makes it easier to specify all the 12 arguments to the
+ * EM027BS013 constructor:
+ */
+ 
+/*
+ * LPC4088QSB_SEC
+ * --------------
+ * Embedded Artists' LPC4088 QuickStart Board + LPC4088 QSB Base Board. 
+ * The display module should be connected using the 14-pos serial expansion
+ * connector on the base board.
+ */
+#define LPC4088QSB_SEC   p13,p11,p12,p14,p10,p9,p20,p19,p37,p38,p17,p18
+
+/*
+ * LPC4088QSB_ARDUINO
+ * ------------------
+ * Embedded Artists' LPC4088 QuickStart Board + LPC4088 QSB Base Board. 
+ * The display module should be connected with jumper cables between the
+ * Arduino so pinlist on the base board and the 14-pos connector on the
+ * display module like this:
+ *
+ * Arduino    Display
+ *   
+ *   GND        J3-1
+ *   AREF       J3-2
+ *   D13        J3-3
+ *   D11        J3-4
+ *   D12        J3-5
+ *   D10        J3-6
+ *   D0         J3-7
+ *   D1         J3-8
+ *   SCL        J3-9
+ *   SDA        J3-10
+ *   D9         J3-11
+ *   D6         J3-12
+ *   D7         J3-13
+ *   D8         J3-14
+ */
+#define LPC4088QSB_ARDUINO   D13,D11,D12,D10,D0,D1,P1_31,P1_30,D9,D6,D7,D8
+
+
+EM027BS013 epaper(LPC4088QSB_SEC);
+
+
+int main() {
+    while(1) {
+        epaper.drawImage((uint8_t*)&image_array_270_ea);
+        wait(5);
+        epaper.drawImage((uint8_t*)&image_array_270_text);
+        wait(5);
+        epaper.drawImage((uint8_t*)&image_array_270_1);
+        wait(5);
+        epaper.drawImage((uint8_t*)&image_array_270_2);
+        wait(5);
+    }
+}