Created
September 26, 2021 11:02
-
-
Save hollyhockberry/91f07c4abe2b6ddf69d13f5401f0041f to your computer and use it in GitHub Desktop.
M5Paper: draw bitmap file with M5GFX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <M5EPD.h> | |
#include <M5GFX.h> | |
// SDカードに以下のファイルを用意 | |
// /inaba.bmp 540x540 24bit | |
// /inaba2.bmp 270x270 24bit | |
void setup() { | |
M5.begin(); | |
M5GFX display; | |
display.begin(); | |
display.invertDisplay(false); | |
display.clear(TFT_WHITE); | |
display.drawBmpFile(SD, "/inaba.bmp", 0, 0); | |
M5Canvas canvas(&display); | |
canvas.setPsram(true); | |
canvas.createSprite(300, 300); | |
canvas.clear(TFT_WHITE); | |
canvas.drawBmpFile(SD, "/inaba2.bmp"); | |
canvas.pushSprite(0, 540); | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment