EmbeddedArtists AB
/
app_epaper_EM027BS013
Example code for the EM027BS013 ePaper display module.
main.cpp@0:02968930216b, 2014-07-22 (annotated)
- Committer:
- embeddedartists
- Date:
- Tue Jul 22 12:02:06 2014 +0000
- Revision:
- 0:02968930216b
- Child:
- 1:6530f3df6024
Example code to use the EM027BS013 ePaper control library. This code is tested with the LPC4088 QuickStart board and the LPC4088 QSB Base Board. The code works with both the 14-pos connector and arduino pinning (using jumper cables)
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 | 0:02968930216b | 23 | * Arduino so pinlist on the base board and the 14-pos connector 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 | 0:02968930216b | 45 | |
embeddedartists | 0:02968930216b | 46 | EM027BS013 epaper(LPC4088QSB_SEC); |
embeddedartists | 0:02968930216b | 47 | |
embeddedartists | 0:02968930216b | 48 | |
embeddedartists | 0:02968930216b | 49 | int main() { |
embeddedartists | 0:02968930216b | 50 | while(1) { |
embeddedartists | 0:02968930216b | 51 | epaper.drawImage((uint8_t*)&image_array_270_ea); |
embeddedartists | 0:02968930216b | 52 | wait(5); |
embeddedartists | 0:02968930216b | 53 | epaper.drawImage((uint8_t*)&image_array_270_text); |
embeddedartists | 0:02968930216b | 54 | wait(5); |
embeddedartists | 0:02968930216b | 55 | epaper.drawImage((uint8_t*)&image_array_270_1); |
embeddedartists | 0:02968930216b | 56 | wait(5); |
embeddedartists | 0:02968930216b | 57 | epaper.drawImage((uint8_t*)&image_array_270_2); |
embeddedartists | 0:02968930216b | 58 | wait(5); |
embeddedartists | 0:02968930216b | 59 | } |
embeddedartists | 0:02968930216b | 60 | } |