Skip to content

Instantly share code, notes, and snippets.

@haratta27
haratta27 / ContactTracingAppFinder.ino
Last active Sep 3, 2020 — forked from ksasao/ContactTracingAppFinder.ino
周辺にあるコロナ接触確認デバイスの数をカウントします。M5stickC−PLUS 用です。Closeは自分のデバイスやかなり近くのデバイス数です。Nearは受信した数、Sumは合計数です。加速度センサにて画面向きが切り替わります。
View ContactTracingAppFinder.ino
#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;
View BeepSpeaker.ino
#include <M5Stack.h>
#include "SimpleBeep.h"
void setup(void){
M5.begin();
sb.init();
}
void loop(void){
View Demo.ino
#include <M5Stack.h>
void setup(){
M5.begin();
Serial.begin(115200);
M5.Lcd.setTextSize(2);
}
void loop(){
View JpgLoopAnime.ino
//==================================================================================
// 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>