Instantly share code, notes, and snippets.

Embed
What would you like to do?
NefryのDisplayに絵を描くデモ
#include <Nefry.h>
#include <NefryDisplay.h>
void drawDotlogo() {
NefryDisplay.drawRect(14, 10, 32, 32);
NefryDisplay.drawRect(15, 11, 30, 30);
NefryDisplay.drawRect(34, 0, 32, 32);
NefryDisplay.drawRect(35, 1, 30, 30);
NefryDisplay.drawString(0, 51, "dotstudio, inc.");
}
#define iotlogo_width 51
#define iotlogo_height 64
static char iotlogo_bits[] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F,
0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80,
0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0xF8,
0xFF, 0xFF, 0xFF, 0x80, 0x07, 0x0F, 0xFE, 0xFF, 0xFF, 0xFF, 0x83, 0x07,
0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00,
0x00, 0x00, 0x80, 0x07, 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0x80, 0x07, 0x0F,
0xFE, 0xFF, 0xFF, 0xFF, 0x83, 0x07, 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0x80,
0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00,
0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0xE0,
0xFF, 0x01, 0x00, 0x80, 0x07, 0x0F, 0xFE, 0xFF, 0x1F, 0x00, 0x80, 0x07,
0x0F, 0xFE, 0xFF, 0x1F, 0x00, 0x80, 0x07, 0x0F, 0xE0, 0xFF, 0x01, 0x00,
0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00,
0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F,
0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80,
0x07, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xFF, 0x0F, 0xE0, 0xFF,
0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x0F,
0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0xFF, 0x07,
0x00, 0x0F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x1F, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0xFF, 0x8F, 0xF3, 0xFF, 0x00, 0x70, 0x00, 0xFF, 0x8F, 0xF3,
0xFF, 0x00, 0x70, 0x00, 0xFF, 0x8F, 0xF3, 0xFF, 0x00, 0x70, 0x00, 0xF0,
0x80, 0x03, 0x0F, 0x00, 0x70, 0x00, 0xF0, 0x80, 0x03, 0x0F, 0x00, 0x70,
0x70, 0xF0, 0x80, 0x03, 0x0F, 0x00, 0x70, 0xFC, 0xF1, 0x80, 0x03, 0x0F,
0x00, 0x70, 0xFE, 0xF3, 0x80, 0x03, 0x0F, 0x00, 0x70, 0x8E, 0xF7, 0x80,
0x03, 0x0F, 0x00, 0x70, 0x07, 0xF7, 0x80, 0x03, 0x0F, 0x00, 0x70, 0x07,
0xF7, 0x80, 0x03, 0x0F, 0x00, 0x70, 0x07, 0xF7, 0x80, 0x03, 0x0F, 0x00,
0x70, 0x8E, 0xF7, 0x80, 0x03, 0x0F, 0x00, 0x70, 0xFE, 0xF3, 0x80, 0x7F,
0x0F, 0x00, 0x70, 0xFC, 0xF1, 0x80, 0x7F, 0x0F, 0x00, 0x70, 0xF0, 0xF0,
0x80, 0x7F, 0x0F, 0x00,
};
void drawIotlogo() {
NefryDisplay.drawXbm(0, 0, iotlogo_width, iotlogo_height, iotlogo_bits);
}
void setup() {
delay(10000);
NefryDisplay.setAutoScrollFlg(true);//自動スクロールを有効にします
}
void loop() {
NefryDisplay.autoScrollFunc(drawIotlogo);
delay(10000);
NefryDisplay.autoScrollFunc(drawDotlogo);
delay(10000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment