![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Example code for the EM027BS013 ePaper display module.
main.cpp@2:7713b53ca9bb, 2014-08-26 (annotated)
- Committer:
- embeddedartists
- Date:
- Tue Aug 26 07:25:20 2014 +0000
- Revision:
- 2:7713b53ca9bb
- Parent:
- 1:6530f3df6024
- Child:
- 3:c69a4ccd446d
Now works with LPC1549 LPCXpresso Board.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:02968930216b | 1 | #include "mbed.h" |
embeddedartists | 0:02968930216b | 2 | #include "EM027BS013.h" |
embeddedartists | 0:02968930216b | 3 | #include "image_data.h" |
embeddedartists | 0:02968930216b | 4 | |
embeddedartists | 0:02968930216b | 5 | /* The following macros makes it easier to specify all the 12 arguments to the |
embeddedartists | 0:02968930216b | 6 | * EM027BS013 constructor: |
embeddedartists | 0:02968930216b | 7 | */ |
embeddedartists | 0:02968930216b | 8 | |
embeddedartists | 0:02968930216b | 9 | /* |
embeddedartists | 0:02968930216b | 10 | * LPC4088QSB_SEC |
embeddedartists | 0:02968930216b | 11 | * -------------- |
embeddedartists | 0:02968930216b | 12 | * Embedded Artists' LPC4088 QuickStart Board + LPC4088 QSB Base Board. |
embeddedartists | 0:02968930216b | 13 | * The display module should be connected using the 14-pos serial expansion |
embeddedartists | 0:02968930216b | 14 | * connector on the base board. |
embeddedartists | 0:02968930216b | 15 | */ |
embeddedartists | 0:02968930216b | 16 | #define LPC4088QSB_SEC p13,p11,p12,p14,p10,p9,p20,p19,p37,p38,p17,p18 |
embeddedartists | 0:02968930216b | 17 | |
embeddedartists | 0:02968930216b | 18 | /* |
embeddedartists | 0:02968930216b | 19 | * LPC4088QSB_ARDUINO |
embeddedartists | 0:02968930216b | 20 | * ------------------ |
embeddedartists | 0:02968930216b | 21 | * Embedded Artists' LPC4088 QuickStart Board + LPC4088 QSB Base Board. |
embeddedartists | 0:02968930216b | 22 | * The display module should be connected with jumper cables between the |
embeddedartists | 1:6530f3df6024 | 23 | * Arduino pinlist on the base board and the 14-pos connector (J3) on the |
embeddedartists | 0:02968930216b | 24 | * display module like this: |
embeddedartists | 0:02968930216b | 25 | * |
embeddedartists | 0:02968930216b | 26 | * Arduino Display |
embeddedartists | 0:02968930216b | 27 | * |
embeddedartists | 0:02968930216b | 28 | * GND J3-1 |
embeddedartists | 0:02968930216b | 29 | * AREF J3-2 |
embeddedartists | 0:02968930216b | 30 | * D13 J3-3 |
embeddedartists | 0:02968930216b | 31 | * D11 J3-4 |
embeddedartists | 0:02968930216b | 32 | * D12 J3-5 |
embeddedartists | 0:02968930216b | 33 | * D10 J3-6 |
embeddedartists | 0:02968930216b | 34 | * D0 J3-7 |
embeddedartists | 0:02968930216b | 35 | * D1 J3-8 |
embeddedartists | 0:02968930216b | 36 | * SCL J3-9 |
embeddedartists | 0:02968930216b | 37 | * SDA J3-10 |
embeddedartists | 0:02968930216b | 38 | * D9 J3-11 |
embeddedartists | 0:02968930216b | 39 | * D6 J3-12 |
embeddedartists | 0:02968930216b | 40 | * D7 J3-13 |
embeddedartists | 0:02968930216b | 41 | * D8 J3-14 |
embeddedartists | 0:02968930216b | 42 | */ |
embeddedartists | 0:02968930216b | 43 | #define LPC4088QSB_ARDUINO D13,D11,D12,D10,D0,D1,P1_31,P1_30,D9,D6,D7,D8 |
embeddedartists | 0:02968930216b | 44 | |
embeddedartists | 1:6530f3df6024 | 45 | /* |
embeddedartists | 1:6530f3df6024 | 46 | * LPC11U68_ARDUINO |
embeddedartists | 1:6530f3df6024 | 47 | * ---------------- |
embeddedartists | 1:6530f3df6024 | 48 | * Connections for the LPCXpresso11U68 board. |
embeddedartists | 1:6530f3df6024 | 49 | * The display module should be connected with jumper cables between the |
embeddedartists | 1:6530f3df6024 | 50 | * Arduino pinlist on the LPCXpresso board and the 14-pos connector (J3) on the |
embeddedartists | 1:6530f3df6024 | 51 | * display module like this: |
embeddedartists | 1:6530f3df6024 | 52 | * |
embeddedartists | 1:6530f3df6024 | 53 | * Arduino Display |
embeddedartists | 1:6530f3df6024 | 54 | * |
embeddedartists | 1:6530f3df6024 | 55 | * GND J3-1 |
embeddedartists | 1:6530f3df6024 | 56 | * AREF J3-2 |
embeddedartists | 1:6530f3df6024 | 57 | * D13 J3-3 |
embeddedartists | 1:6530f3df6024 | 58 | * D11 J3-4 |
embeddedartists | 1:6530f3df6024 | 59 | * D12 J3-5 |
embeddedartists | 1:6530f3df6024 | 60 | * D10 J3-6 |
embeddedartists | 1:6530f3df6024 | 61 | * D0 J3-7 |
embeddedartists | 1:6530f3df6024 | 62 | * D1 J3-8 |
embeddedartists | 1:6530f3df6024 | 63 | * SCL J3-9 |
embeddedartists | 1:6530f3df6024 | 64 | * SDA J3-10 |
embeddedartists | 1:6530f3df6024 | 65 | * D9 J3-11 |
embeddedartists | 1:6530f3df6024 | 66 | * D6 J3-12 |
embeddedartists | 1:6530f3df6024 | 67 | * D7 J3-13 |
embeddedartists | 1:6530f3df6024 | 68 | * D8 J3-14 |
embeddedartists | 1:6530f3df6024 | 69 | */ |
embeddedartists | 1:6530f3df6024 | 70 | #define LPC11U68_ARDUINO D13,D11,D12,D10,D0,D1,SCL,SDA,D9,D6,D7,D8 |
embeddedartists | 1:6530f3df6024 | 71 | |
embeddedartists | 1:6530f3df6024 | 72 | /* |
embeddedartists | 1:6530f3df6024 | 73 | * LPC1549_ARDUINO |
embeddedartists | 1:6530f3df6024 | 74 | * --------------- |
embeddedartists | 1:6530f3df6024 | 75 | * Connections for the LPCXpresso1549 board. |
embeddedartists | 1:6530f3df6024 | 76 | * The display module should be connected with jumper cables between the |
embeddedartists | 1:6530f3df6024 | 77 | * Arduino pinlist on the LPCXpresso board and the 14-pos connector (J3) on the |
embeddedartists | 1:6530f3df6024 | 78 | * display module like this: |
embeddedartists | 1:6530f3df6024 | 79 | * |
embeddedartists | 1:6530f3df6024 | 80 | * Arduino Display |
embeddedartists | 1:6530f3df6024 | 81 | * |
embeddedartists | 1:6530f3df6024 | 82 | * GND J3-1 |
embeddedartists | 1:6530f3df6024 | 83 | * AREF J3-2 |
embeddedartists | 1:6530f3df6024 | 84 | * D13 J3-3 |
embeddedartists | 1:6530f3df6024 | 85 | * D11 J3-4 |
embeddedartists | 1:6530f3df6024 | 86 | * D12 J3-5 |
embeddedartists | 1:6530f3df6024 | 87 | * D10 J3-6 |
embeddedartists | 1:6530f3df6024 | 88 | * D0 J3-7 |
embeddedartists | 1:6530f3df6024 | 89 | * D1 J3-8 |
embeddedartists | 1:6530f3df6024 | 90 | * SCL J3-9 |
embeddedartists | 1:6530f3df6024 | 91 | * SDA J3-10 |
embeddedartists | 1:6530f3df6024 | 92 | * D9 J3-11 |
embeddedartists | 1:6530f3df6024 | 93 | * D6 J3-12 |
embeddedartists | 1:6530f3df6024 | 94 | * D7 J3-13 |
embeddedartists | 1:6530f3df6024 | 95 | * D8 J3-14 |
embeddedartists | 1:6530f3df6024 | 96 | */ |
embeddedartists | 1:6530f3df6024 | 97 | #define LPC1549_ARDUINO D13,D11,D12,D10,D0,D1,SCL,SDA,D9,D6,D7,D8 |
embeddedartists | 0:02968930216b | 98 | |
embeddedartists | 2:7713b53ca9bb | 99 | EM027BS013 epaper(LPC1549_ARDUINO); |
embeddedartists | 0:02968930216b | 100 | |
embeddedartists | 0:02968930216b | 101 | |
embeddedartists | 0:02968930216b | 102 | int main() { |
embeddedartists | 0:02968930216b | 103 | while(1) { |
embeddedartists | 0:02968930216b | 104 | epaper.drawImage((uint8_t*)&image_array_270_ea); |
embeddedartists | 0:02968930216b | 105 | wait(5); |
embeddedartists | 0:02968930216b | 106 | epaper.drawImage((uint8_t*)&image_array_270_text); |
embeddedartists | 0:02968930216b | 107 | wait(5); |
embeddedartists | 0:02968930216b | 108 | epaper.drawImage((uint8_t*)&image_array_270_1); |
embeddedartists | 0:02968930216b | 109 | wait(5); |
embeddedartists | 0:02968930216b | 110 | epaper.drawImage((uint8_t*)&image_array_270_2); |
embeddedartists | 0:02968930216b | 111 | wait(5); |
embeddedartists | 0:02968930216b | 112 | } |
embeddedartists | 0:02968930216b | 113 | } |