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
from m5stack import lcd | |
import time | |
def drawData(): | |
dataList = [0,0,0,0,0,0,0,0, | |
0,0,1,0,0,1,0,0, | |
0,0,1,0,0,1,0,0, | |
0,0,1,0,0,1,0,0, | |
0,0,0,0,0,0,0,0, | |
0,1,0,0,0,0,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
from m5stack import lcd | |
import utime | |
import machine | |
lcd.clear() | |
lcd.setCursor(0, 0) | |
lcd.setColor(lcd.WHITE) | |
switch_pin = machine.Pin(2, machine.Pin.IN, machine.Pin.PULL_UP) |
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 <M5Stack.h> | |
#include <SD.h> | |
#include <Wire.h> | |
#include <JPEGDecoder.h> | |
#define PI 3.141592653589793 | |
const int DOT_SIZE = 5; | |
#define SIZE_X 48 | |
#define SIZE_Y 48 |
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
javascript:(function(){var url=location.href;var keyword="from:" + url.substr(url.lastIndexOf("/")+1) + "%20%20-RT&f=tweets";location.href = "https://twitter.com/search?q="+ keyword;})(); |
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 <M5Stack.h> | |
TFT_eSprite img = TFT_eSprite(&M5.Lcd); | |
int cgData[]={CYAN,0,110,0,152,51,60,44,117,112,132,109,198,156,58,162,138,211,132,201,198,257,57,271,130,319,112,319,195,-1,-1, | |
GREEN,0,200,0,103,29,203,41,142,89,138,99,67,137,188,139,135,184,118,196,57,232,193,246,135,319,118,319,37,-1,-1, | |
GREEN,0,51,0,114,99,104,117,199,174,27,194,121,319,124,319,222,-1,-1, | |
DARKCYAN, 0,121,0,96,22,109,35,56,47,166,55,116,68,134,83,54,85,184,100,116,125,117,147,49,148,174,162,101,183,124,193,41,208,176,217,107,233,129,252,54,257,191,271,112,319,97,319,17,-1,-1, | |
WHITE,0,141,0,86,59,172,89,112,156,121,169,56,206,177,229,131,319,132,319,59,-1,-1, | |
GREEN,0,152,0,84,83,182,100,137,223,129,228,52,319,186,319,129,-1,-1, |
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 sys | |
import os | |
import json | |
args = sys.argv | |
fileName = args[1] | |
motionFile = open(fileName, 'r') | |
motionJson = json.load(motionFile) |
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() |
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
#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
#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) |