This file contains 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 <driver/adc.h> | |
#include <M5Stack.h> | |
void setup() { | |
Serial.begin(115200); | |
M5.begin(); | |
M5.Speaker.setVolume(0); | |
M5.Lcd.setBrightness(200); | |
adc1_config_width(ADC_WIDTH_12Bit); |
This file contains 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 <driver/adc.h> | |
#include <M5Stack.h> | |
const int _bufSize = 128; | |
int _buf[_bufSize]; // adc buffer for suppress speaker noise | |
int _pos = 0; | |
int _old = 0; | |
int _count = 0; | |
int _offset = 0; |
This file contains 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
// | |
// Grove Serial Camera Kit demo for M5Stack | |
// | |
// !! CAUTION !! | |
// This code uses M5Stack Grove I2C as Grove UART (serial port). | |
// REMOVE all I2C devices. | |
// | |
// original code: | |
// https://github.com/Seeed-Studio/Grove_Serial_Camera_Kit/blob/master/SerialCameral_DemoCode_CJ_OV528_SoftSer/SerialCameral_DemoCode_CJ_OV528_SoftSer.ino | |
// File SerialCamera_DemoCode_CJ-OV528.ino |
This file contains 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
// M5Stack Text-to-Speech demo using AquesTalk pico for ESP32 | |
// see: http://blog-yama.a-quest.com/?eid=970188 | |
#include <M5Stack.h> | |
#include "driver/i2s.h" | |
#include "aquestalk.h" | |
#define LEN_FRAME 32 | |
uint32_t workbuf[AQ_SIZE_WORKBUF]; | |
void setup() { |
This file has been truncated, but you can view the full file.
This file contains 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 "M5StackUpdater.h" | |
const unsigned char _buf[] ={ | |
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, | |
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, | |
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, | |
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, | |
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, | |
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, |
This file contains 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
// Talking wrist watch for M5Stack | |
// 2018/4/8 @ksasao | |
// | |
// see: | |
// https://twitter.com/meganetaaan/status/982258576361078784 | |
// http://blog-yama.a-quest.com/?eid=970191 | |
// prerequisite: AquesTalk pico for ESP32 | |
// https://www.a-quest.com/download.html#a-etc | |
#include <M5Stack.h> | |
#include "avator.h" |
This file contains 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 socket | |
import threading | |
HOST = '0.0.0.0' | |
PORT = 24081 | |
BUFFER_SIZE = 1024 | |
def udpServer(): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.bind((HOST, PORT)) |
This file contains 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 numpy as np | |
import random | |
import math | |
import cv2 | |
from PIL import Image | |
def recognize(im): | |
# 輪郭線抽出のための二値化 | |
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
im_blur = cv2.GaussianBlur(im_gray, (3, 3), 0) |
This file contains 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 numpy as np | |
import random | |
import math | |
import cv2 | |
from PIL import Image | |
import sys | |
def detect_markers(im): | |
markers = [] | |
# 輪郭線抽出のための二値化 |
This file contains 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
'''This script records your device's orientation (accelerometer data) for 5 seconds, and then renders a simple plot of the gravity vector, using matplotlib.''' | |
import motion | |
import matplotlib.pyplot as plt | |
from time import sleep | |
import console | |
def main(): |