Created
April 4, 2022 08:57
-
-
Save ISTweak/4cc4024c0ef1bd3f2014407a5ef1236c to your computer and use it in GitHub Desktop.
M5GFXとM5.lcdの色の違い
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 <M5Stack.h> | |
#include <M5GFX.h> | |
const unsigned char sampleimg[16 * 16 * 2 + 1] = | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007\340\007" | |
"\340\007\340\007\340\007\340\007"; | |
#define USE_GFX 1 | |
#ifdef USE_GFX | |
M5GFX display; | |
LGFX_Sprite spicon(&display); | |
#else | |
M5Stack display; | |
TFT_eSprite spicon(&M5.Lcd); | |
#endif | |
void setup() { | |
display.begin(); | |
spicon.createSprite(16, 16); | |
spicon.pushImage(0, 0, 16, 16, (uint16_t*)sampleimg); | |
spicon.pushSprite(144, 110); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment