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
// 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> |
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
/* 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 |
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 "M5Atom.h" | |
/* this Example only for M5Atom Matrix */ | |
const unsigned numberPixel[10][25] = { | |
{ 0, 1, 1, 1, 0, | |
0, 1, 0, 1, 0, | |
0, 1, 0, 1, 0, | |
0, 1, 0, 1, 0, | |
0, 1, 1, 1, 0 |
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 <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 |
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
こちらに移動 https://github.com/shikarunochi/M5StackGraphicLoader/tree/master/MAGLoader |
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 <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) |
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 <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) |
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
#ifndef __EFONT_SSD1306_H__ | |
#define __EFONT_SSD1306_H__ | |
#include "efont.h" | |
//#define EFONT_DEBUG | |
void printEfont(Adafruit_SSD1306 *display, char *str) { | |
int posX = display->getCursorX(); | |
int posY = display->getCursorY(); |
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
//移植元はこちらです。 | |
//https://twitter.com/yanatoku/status/1043501621030703104 | |
//https://twitter.com/Stosstruppe/status/1245682316325740545 | |
//https://twitter.com/Stosstruppe/status/1246383338635407365 | |
#include <M5Stack.h> | |
int dt[256], db[256]; | |
void setup(void) { |
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
input.onButtonPressed(Button.AB, function () { | |
basic.pause(5000) | |
basic.showNumber(0) | |
motion00() | |
basic.showNumber(1) | |
motion01() | |
basic.showNumber(2) | |
motion02() | |
basic.showNumber(3) | |
motion03() |