epaper

Dependents:   epaper_mbed_test_copy1

Fork of EaEpaper by Peter Drescher

Committer:
fenoth
Date:
Tue Apr 08 10:07:49 2014 +0000
Revision:
3:6e990a69c6cf
new

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fenoth 3:6e990a69c6cf 1 #include "mbed.h"
fenoth 3:6e990a69c6cf 2 #include "EaEpaper.h"
fenoth 3:6e990a69c6cf 3 #include "QR_Encode.h"
fenoth 3:6e990a69c6cf 4
fenoth 3:6e990a69c6cf 5
fenoth 3:6e990a69c6cf 6 EaEpaper epaper;
fenoth 3:6e990a69c6cf 7
fenoth 3:6e990a69c6cf 8 int main()
fenoth 3:6e990a69c6cf 9 {
fenoth 3:6e990a69c6cf 10 string d;
fenoth 3:6e990a69c6cf 11 d = "alufit";
fenoth 3:6e990a69c6cf 12
fenoth 3:6e990a69c6cf 13 BYTE QR_m_data[3917]; //max possible bits resolution 177*177/8+1
fenoth 3:6e990a69c6cf 14 int QR_width=EncodeData(3,3,d,0,QR_m_data);
fenoth 3:6e990a69c6cf 15
fenoth 3:6e990a69c6cf 16 for(int y=0;y<QR_width;y++) {
fenoth 3:6e990a69c6cf 17 for(int x=0;x<QR_width;x++) {
fenoth 3:6e990a69c6cf 18 int value = get_next_bit();
fenoth 3:6e990a69c6cf 19 epaper.clear();
fenoth 3:6e990a69c6cf 20
fenoth 3:6e990a69c6cf 21 while(1) {
fenoth 3:6e990a69c6cf 22 epaper.write(img0_bits);
fenoth 3:6e990a69c6cf 23 wait(10);
fenoth 3:6e990a69c6cf 24 epaper.write(x,y,value);
fenoth 3:6e990a69c6cf 25 wait(10);
fenoth 3:6e990a69c6cf 26 }
fenoth 3:6e990a69c6cf 27
fenoth 3:6e990a69c6cf 28 }}
fenoth 3:6e990a69c6cf 29 return 0;
fenoth 3:6e990a69c6cf 30 }