Color/int16_t
TFT_BLACK | 0x0000 | 0 | 0 | 0 | |
TFT_NAVY | 0x000F | 0 | 0 | 128 | |
TFT_DARKGREEN | 0x03E0 | 0 | 128 | 0 | |
TFT_DARKCYAN | 0x03EF | 0 | 128 | 128 | |
TFT_MAROON | 0x7800 | 128 | 0 | 0 | |
TFT_PURPLE | 0x780F | 128 | 0 | 128 | |
TFT_OLIVE | 0x7BE0 | 128 | 128 | 0 | |
TFT_LIGHTGREY | 0xC618 | 192 | 192 | 192 | |
TFT_DARKGREY | 0x7BEF | 128 | 128 | 128 | |
TFT_BLUE | 0x001F | 0 | 0 | 255 | |
TFT_GREEN | 0x07E0 | 0 | 255 | 0 | |
TFT_CYAN | 0x07FF | 0 | 255 | 255 | |
TFT_RED | 0xF800 | 255 | 0 | 0 | |
TFT_MAGENTA | 0xF81F | 255 | 0 | 255 | |
TFT_YELLOW | 0xFFE0 | 255 | 255 | 0 | |
TFT_WHITE | 0xFFFF | 255 | 255 | 255 | |
TFT_ORANGE | 0xFDA0 | 255 | 180 | 0 | |
TFT_GREENYELLOW | 0xB7E0 | 180 | 255 | 0 | |
TFT_PINK | 0xFC9F | * | * | * | |
TFT_TRANSPARENT | 0x0120 | * | * | * |
M5.begin
M5.begin(bool LCDEnable=true, bool SDEnable=true, bool SerialEnable=true)
システム初期化
M5.update
M5.update()
M5.lcd.setBrightness
M5.lcd.setBrightness(uint8_t brightness)
M5.Lcd.drawPixel
M5.Lcd.drawPixel(int16_t x, int16_t y, uint16_t color)
M5.Lcd.drawLine
M5.Lcd.drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
M5.Lcd.fillRect
M5.Lcd.fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
M5.Lcd.fillScreen
M5.Lcd.fillScreen(uint16_t color)
M5.Lcd.drawCircle
M5.Lcd.drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
M5.Lcd.drawCircleHelper
M5.Lcd.drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,uint16_t color)
M5.Lcd.drawTriangle
M5.Lcd.drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
M5.Lcd.fillTriangle
M5.Lcd.fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
M5.Lcd.drawRoundRect
M5.Lcd.drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
M5.Lcd.fillRoundRect
M5.Lcd.fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
M5.Lcd.drawBitmap
M5.Lcd.drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)
M5.Lcd.drawRGBBitmap
M5.Lcd.drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w, int16_t h)
M5.Lcd.drawChar
M5.Lcd.drawChar(uint16_t x, uint16_t y, char c, uint16_t color, uint16_t bg, uint8_t size)
M5.Lcd.setCursor
M5.Lcd.setCursor(uint16_t x0, uint16_t y0)
M5.Lcd.setTextColor
M5.Lcd.setTextColor(uint16_t color)
文字色と背景色をcolorに設定する
M5.Lcd.setTextColor
M5.Lcd.setTextColor(uint16_t color, uint16_t backgroundcolor)
文字色と背景色をそれぞれ(color, backgroundcolor)に設定する。
M5.Lcd.setTextSize
M5.Lcd.setTextSize(uint8_t size)
テキストの拡大倍率を指定する。最大許容値は7、7を超える場合は7が設定される。また0は許容できない。0を入力した場合は1が設定される。
M5.Lcd.setTextWrap
M5.Lcd.setTextWrap(boolean w)
M5.Lcd.printf
M5.Lcd.printf(...)
M5.Lcd.print
M5.Lcd.print(...)
M5.Lcd.println
M5.Lcd.println(...)
M5.Lcd.drawCentreString
M5.Lcd.drawCentreString(const char *string, int dX, int poY, int font)
M5.Lcd.drawRightString
M5.Lcd.drawRightString(const char *string, int dX, int poY, int font)
M5.Lcd.drawJpg
M5.Lcd.drawJpg(const uint8_t *jpg_data, size_t jpg_len, uint16_t x, uint16_t y)
M5.Lcd.drawJpgFile
M5.Lcd.drawJpgFile(fs::FS &fs, const char *path, uint16_t x, uint16_t y)
M5.Lcd.drawBmpFile
M5.Lcd.drawBmpFile(fs::FS &fs, const char *path, uint16_t x, uint16_t y)
M5.BtnA/B/C.read
uint8_t M5.BtnA/B/C.read()
ボタンの状態を読み取って情報を維持し、状態(1=押されている,0=押されていない)を返却する。
M5.BtnA/B/C.isPressed
uint8_t M5.BtnA/B/C.isPressed()
M5BtnA/B/C.readの結果がpressだったかどうかを返す。この関数はボタンの状態は読まない。
M5.BtnA/B/C.isReleased
uint8_t M5.BtnA/B/C.isReleased()
M5BtnA/B/C.readの結果がreleaseだったかどうかを返す。この関数はボタンの状態は読まない。
M5.BtnA/B/C.wasPressed
uint8_t M5.BtnA/B/C.wasPressed()
M5BtnA/B/C.readの結果がreleaseからpressに変化したかどうかを返す。この関数はボタンの状態は読まない。
M5.BtnA/B/C.wasReleased
uint8_t M5.BtnA/B/C.wasReleased()
M5BtnA/B/C.readの結果がreleaseからpressに変化したかどうかを返す。この関数はボタンの状態は読まない。
M5.BtnA/B/C.pressedFor
uint8_t M5.BtnA/B/C.pressedFor(uint32_t ms)
ms内にボタンが押されたかどうかを返す。この関数はボタンの状態は読まない。
M5.BtnA/B/C.releasedFor
uint8_t M5.BtnA/B/C.releasedFor(uint32_t ms)
ms内にボタンが離されたかどうかを返す。この関数はボタンの状態は読まない。
M5.BtnA/B/C.lastChange
uint32_t M5.BtnA/B/C.lastChange()
ボタンの状態が変化したときの時間を返す。
M5.Speaker.tone
M5.Speaker.tone(uint32_t freq)
M5.Speaker.tone
M5.Speaker.tone(freq, time)
M5.Speaker.beep
M5.Speaker.beep()
M5.Speaker.setBeep
M5.Speaker.setBeep(uint16_t frequency, uint16_t duration)
M5.Speaker.mute
M5.Speaker.mute()