Skip to content

Instantly share code, notes, and snippets.

@shikarunochi
shikarunochi / helloJP2.ino
Created April 15, 2020 09:22
M5Atom + SSD1306 日本語表示 2画面
#include <M5Atom.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "efontEnableJa.h"
#include "efontSSD1306.h"
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
@shikarunochi
shikarunochi / MAGLoader.ino
Last active May 5, 2020 15:35
MAG画像ファイルローダー for M5Stack FIRE
こちらに移動 https://github.com/shikarunochi/M5StackGraphicLoader/tree/master/MAGLoader
@shikarunochi
shikarunochi / newsPicker.ino
Created May 15, 2020 01:49
ニュース情報を取得してOLED表示 for M5Atom
#include <M5Atom.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "efontEnableJa.h"
#include "efontSSD1306.h"
#include <WiFi.h>
#include <WiFiClientSecure.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
@shikarunochi
shikarunochi / PS2Keyboard_Simple_Test.ino
Created June 13, 2020 15:35
M5Atom + PS/2 Keyboard + SSD1306 OLED
/* PS2Keyboard library example
PS2Keyboard now requries both pins specified for begin()
keyboard.begin(data_pin, irq_pin);
Valid irq pins:
Arduino Uno: 2, 3
Arduino Due: All pins, except 13 (LED)
Arduino Mega: 2, 3, 18, 19, 20, 21
@shikarunochi
shikarunochi / Ambient.ino
Created November 18, 2020 15:05
SHT30+BMP280+SGP30 for M5Atom
// https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/ENVII/Arduino/ENVII ENV-II Unit example
// https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/TVOC TVOC/eCO2 Unit example
// https://ambidata.io/samples/m5stack/m5stackcurrent/ DEEP SLEEP
// https://qazsedcftf.blogspot.com/2019/01/esp32arduino.html Wi-Fi 接続リトライ
#include <M5Atom.h>
#include <Wire.h>
#include "Adafruit_Sensor.h"
#include <Adafruit_BMP280.h>
@shikarunochi
shikarunochi / LGFXTest.ino
Last active January 27, 2021 15:58
LGFX double LCD Test
//本体 LCD と 外部 240x240小型液晶での出力。うまくいきました!
// https://twitter.com/shikarunochi/status/1354455285046231043?s=20
#include <LovyanGFX.hpp>
#define LGFX_M5STACK
static LGFX lcd;
struct EXLCD_LGFX_Config
{
static constexpr spi_host_device_t spi_host = HSPI_HOST; //本体LCDが VSPI を使っているので、別のピンで HSPI を使う。
//VSPIでピンを共有する方法もあります。
//https://gist.github.com/lovyan03/7e0cd8362d7252124ae281526d5eaac1
@shikarunochi
shikarunochi / imageSender.py
Last active March 16, 2021 14:43
Image & Movie Sender for ESP32 ScreenShotReceiver
#ImageSender for ESP32 ScreenShotReceiver https://github.com/lovyan03/ESP32_ScreenShotReceiver
import sys
import socket
from PIL import Image
import io
IMAGE_QUALITY = 60
LCD_WIDTH = 320
LCD_HEIGHT = 320
@shikarunochi
shikarunochi / HID_TEST.ino
Last active November 21, 2021 06:35
AtomLite + AtomDisplay + Bluetooth Keyboard TEST
#include <M5Atom.h>
#include <M5AtomDisplay.h>
#include "hid_server/hid_server.h"
M5AtomDisplay display;
void setup() {
M5.begin();
display.init();
#include <M5Atom.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <WiFi.h>
#include "time.h"
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)