mirror of
https://github.com/usetrmnl/bb_epaper.git
synced 2026-04-29 13:43:26 -07:00
almost functional
This commit is contained in:
@@ -6,8 +6,22 @@
|
||||
//
|
||||
#include "../../../src/bb_epaper.h"
|
||||
BBEPAPER bbep(EPD27_176x264); // Waveshare 2.7" e-paper HAT
|
||||
// BCM GPIO numbers
|
||||
#define PIN_DC 25
|
||||
#define PIN_RST 17
|
||||
#define PIN_BUSY 24
|
||||
#define PIN_CS 8
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
bbep.initIO(PIN_DC, PIN_RST, PIN_BUSY, PIN_CS, 0, 8000000);
|
||||
bbep.fillRect(0,0,128,296, BBEP_WHITE);
|
||||
bbep.setRotation(90);
|
||||
bbep.setFont(FONT_12x16);
|
||||
bbep.setTextColor(BBEP_BLACK, BBEP_WHITE);
|
||||
bbep.drawString("Hello World!", 0, 0);
|
||||
bbep.refresh(REFRESH_FULL);
|
||||
bbep.sleep(DEEP_SLEEP);
|
||||
|
||||
return 0;
|
||||
} /* main() */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user