This file contains hidden or 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 <Arduino.h> | |
| #include <Wire.h> | |
| #include <M5GFX.h> | |
| #include <lgfx/v1/panel/Panel_ST7789.hpp> | |
| #include "Arduino_BMI270_BMM150.h" | |
| #define DEBUG_SERIAL Serial | |
| // #define DEBUG_SERIAL Serial1 | |
| class NessoN1_Lcd : public lgfx::LGFX_Device { |
This file contains hidden or 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
| # | |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # mkgfxfont.sh - Generate u8g2 font header (.hpp) for LovyanGFX/M5GFX | |
| # | |
| # | |
| # Author: imliubo | |
| # License: MIT | |
| # |
This file contains hidden or 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 <Arduino.h> | |
| #include "M5Unified.h" | |
| #include "unit_puzzle.hpp" | |
| static void plasma_mode(bool en_mask); | |
| static void rainbow_mode(bool en_mask); | |
| static void rainbow_move_mode(int hue_offset, bool en_mask); | |
| M5Canvas canvas(&M5.Lcd); | |
| M5Canvas canvas_m5_mask(&M5.Lcd); |
This file contains hidden or 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
| # -*- encoding: utf-8 -*- | |
| # User display example | |
| from M5 import UserDisplay, Widgets | |
| user_lcd = UserDisplay( | |
| # LCD type | |
| panel_type=UserDisplay.PANEL.GC9A01, | |
| # resolution | |
| width=240, | |
| height=240, |
This file contains hidden or 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
| /* | |
| A simple clock based on M5CoreInk. | |
| */ | |
| #include <WiFi.h> | |
| #include <sntp.h> | |
| #include <M5Unified.h> | |
| #define WIFI_SSID "YOUR WIFI SSID" | |
| #define WIFI_PASSWORD "YOUR WIFI PASSWD" | |
| #define NTP_TIMEZONE "JST-8" |
This file contains hidden or 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
| import sys | |
| import m5 | |
| from m5 import lcd | |
| import lvgl as lv | |
| from imagetools import get_png_info, open_png | |
| # M5 init auto detect board type | |
| m5.begin() | |
| # lvgl init | |
| lcd.lvgl_init() |
This file contains hidden or 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
| import urequests | |
| import time | |
| import wifiCfg | |
| from m5stack import lv, rtc | |
| wifiCfg.auto_connect() | |
| ticks_ms = 0 | |
| old_tick = 0 |