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
// Copyright (c) 2024 Inaba (@hollyhockberry) | |
// This software is released under the MIT License. | |
// http://opensource.org/licenses/mit-license.php | |
#include <M5Unified.h> | |
#include <Avatar.h> | |
using m5avatar::BoundingRect; | |
using m5avatar::DrawContext; | |
using m5avatar::Eye; |
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 <M5Unified.h> | |
#include <Avatar.h> | |
using namespace m5avatar; | |
namespace { | |
M5Canvas asset; | |
// 回り込みするパーツのサンプル |
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 <M5Unified.h> | |
M5Canvas canvas, asset; | |
void setup() { | |
M5.begin(); | |
canvas.setColorDepth(1); | |
canvas.createSprite(320, 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
#include <M5Unified.h> | |
M5Canvas sprite; | |
void setup() { | |
M5.begin(); | |
sprite.createSprite(120, 120); | |
sprite.drawCircle(sprite.width() >> 1, sprite.height() >> 1, sprite.width() >> 2, RED); | |
sprite.drawRect(0, 0, sprite.width() - 1, sprite.height() - 1, RED); |
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
// Copyright (c) 2023 Inaba (@hollyhockberry) | |
// This software is released under the MIT License. | |
// http://opensource.org/licenses/mit-license.php | |
#include <M5Unified.h> | |
#include <driver/pcnt.h> | |
#include <IRsend.h> | |
#include <IRrecv.h> | |
#include <limits> |
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 <M5UnitGLASS2.h> | |
M5UnitGLASS2 display (2, 1, 400000); | |
constexpr size_t POINTS = 128; | |
int points[POINTS]; | |
void setup() { | |
display.init(); | |
display.startWrite(); | |
display.fillScreen(TFT_BLACK); |
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 <math.h> | |
#include <Arduino.h> | |
#define LGFX_USE_V1 | |
#include <SPIFFS.h> | |
#include <LovyanGFX.hpp> | |
namespace { | |
struct Touch_XiaoRound : public lgfx::v1::ITouch { | |
Touch_XiaoRound() { |
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 http.server | |
class handler(http.server.BaseHTTPRequestHandler): | |
def do_POST(self): | |
""" show request header """ | |
print() | |
print('=== POST REQUEST HEADER ===') | |
print(self.headers) | |
content_length = self.headers.get("content-length") |
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
// Copyright (c) 2023 Inaba (@hollyhockberry) | |
// This software is released under the MIT License. | |
// http://opensource.org/licenses/mit-license.php | |
#include <SD.h> | |
#include <M5Unified.h> | |
#include <WiFi.h> | |
#include <HTTPClient.h> | |
#include <ArduinoJson.h> | |
#include <gob_unifiedButton.hpp> |
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 time | |
import board | |
import busio | |
import digitalio | |
import displayio | |
_START_SEQUENCE = ( | |
b"\x12\x80\x14" # soft reset and wait 20ms | |
b"\x11\x01\x03" # Ram data entry mode | |
b"\x3C\x01\x05" # border color |
NewerOlder