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
// Copyright (c) 2023 Inaba (@hollyhockberry) | |
// This software is released under the MIT License. | |
// http://opensource.org/licenses/mit-license.php | |
#include <SD.h> | |
#include <M5Unified.h> | |
#include <WiFi.h> | |
#include <HTTPClient.h> | |
#include <ArduinoJson.h> | |
#include <gob_unifiedButton.hpp> |
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
# RTSPを受信して .mp4 にエンコード | |
# ATOM Cam 2 は 20fps が標準 (赤外カメラモードでは15fpsとなるが下記コードは未対応) | |
import cv2 | |
import datetime | |
import os | |
# 日付をファイル名にする | |
def get_filename(): | |
now = datetime.datetime.now() | |
filename = './mp4/' + now.strftime('%Y%m%d_%H%M') + '.mp4' |
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
// UARTで受信したデータをESP-NOWで送信するサンプル | |
// 受信はESP-NOW MONITORが使えます。https://gist.github.com/mongonta0716/6a749f3f5a3e119d47a13b5c5c9c69db | |
#include <Arduino.h> | |
#include <M5Unified.h> | |
#include <esp_now.h> | |
#include <WiFi.h> | |
#include <esp_wifi.h> | |
esp_now_peer_info_t esp_ap; |
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
// The source of the following link has been modified | |
// https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/PDM | |
#include <M5Core2.h> | |
#include <driver/i2s.h> | |
#include "fft.h" | |
#define PIN_CLK 33 | |
#define PIN_DATA 32 |
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 urequests | |
import time | |
import wifiCfg | |
from m5stack import lv, rtc | |
wifiCfg.auto_connect() | |
ticks_ms = 0 | |
old_tick = 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
#include <Arduino.h> | |
#ifdef ARDUINO_M5STACK_Core2 | |
#include <M5Core2.h> | |
#elif defined(ARDUINO_M5STACK_FIRE) || defined(ARDUINO_M5Stack_Core_ESP32) | |
#include <M5Stack.h> | |
#endif | |
#define LGFX_AUTODETECT | |
#include <LovyanGFX.hpp> | |
#include <esp_now.h> | |
#include <WiFi.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
#include <M5Core2.h> | |
#include <WiFi.h> | |
const char* SSID = "SSID"; | |
const char* PASSWORD = "SSID Password"; | |
const char* NTP_SERVER = "ntp.jst.mfeed.ad.jp"; | |
const char* TZ = "JST-9"; | |
const uint8_t FONT_NUMBER = 2; // 16px ASCII Font | |
const uint8_t FONT_SIZE = 16; |
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 <wiring_private.h> | |
static Uart Serial3(&sercom3, PIN_WIRE_SCL, PIN_WIRE_SDA, SERCOM_RX_PAD_1, UART_TX_PAD_0); | |
void setup() { | |
Serial.begin(115200); | |
while(!Serial); | |
Serial3.begin(115200); | |
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT); |
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 lcd | |
import image | |
import time | |
import uos | |
lcd.init() | |
lcd.rotation(2) #Rotate the lcd 180deg | |
from Maix import I2S, GPIO | |
from Maix import GPIO |
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
# M5StickVの電源管理方法 | |
# https://github.com/sipeed/MaixPy/blob/master/components/boards/m5stick/src/m5stick.c | |
# https://github.com/sipeed/MaixPy/blob/master/projects/maixpy_m5stickv/builtin_py/pmu.py | |
# https://pdf1.alldatasheet.com/datasheet-pdf/view/757469/ETC2/AXP192.html | |
# 参考: M5StickC https://github.com/m5stack/M5StickC/blob/master/src/AXP192.cpp | |
import lcd | |
import pmu |
NewerOlder