Skip to content

Instantly share code, notes, and snippets.

//==================================================================================
// 2020/03/08 M5Stack_JpgLoopAnime Simple.ver
// Arranger:haratta27
// Orignal: lovyan03 / https://github.com/lovyan03/M5Stack_JpgLoopAnime
//==================================================================================
#pragma GCC optimize ("O3")
#include <M5Stack.h>
//#include <M5StackUpdater.h> // https://github.com/tobozo/M5Stack-SD-Updater/
#include <esp_heap_alloc_caps.h>
#include <M5Stack.h>
void setup(){
M5.begin();
Serial.begin(115200);
M5.Lcd.setTextSize(2);
}
void loop(){
#include <M5Stack.h>
#include "SimpleBeep.h"
void setup(void){
M5.begin();
sb.init();
}
void loop(void){
@haratta27
haratta27 / ContactTracingAppFinder.ino
Last active September 3, 2020 14:58 — forked from ksasao/ContactTracingAppFinder.ino
周辺にあるコロナ接触確認デバイスの数をカウントします。M5stickC−PLUS 用です。Closeは自分のデバイスやかなり近くのデバイス数です。Nearは受信した数、Sumは合計数です。加速度センサにて画面向きが切り替わります。
#include <M5StickCPlus.h>
#include <BLEDevice.h>
// Contact Tracing Bluetooth Specification (Apple/Google)
// https://blog.google/documents/58/Contact_Tracing_-_Bluetooth_Specification_v1.1_RYGZbKW.pdf
const char* uuid = "0000fd6f-0000-1000-8000-00805f9b34fb";
unsigned int near_count = 0;
unsigned int close_count = 0;
BLEScan* pBLEScan;
@haratta27
haratta27 / Sample-M5stackCore2-and-Glass2.cpp
Created February 4, 2024 08:51
M5stack Core2 と Glass2 Unit 両方の画面表示をする サンプルコード
#include <Arduino.h>
#include <M5Unified.h>
#include <M5UnitGLASS2.h>
M5UnitGLASS2 display; // default setting //auto
//M5UnitGLASS2 display( 32, 33, 400000 ); // SDA, SCL, FREQ  
M5Canvas canvas(&display);
static constexpr char text[] = "Hello world ! こんにちは世界! this is long long string sample. 寿限無、寿限無、五劫の擦り切れ、海砂利水魚の、水行末・雲来末・風来末、喰う寝る処に住む処、藪ら柑子の藪柑子、パイポ・パイポ・パイポのシューリンガン、シューリンガンのグーリンダイ、グーリンダイのポンポコピーのポンポコナの、長久命の長助";