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 <Arduino.h> | |
| #include <M5Unified.h> | |
| #include <MFRC522_I2C.h> | |
| /* | |
| ******************************************************************************* | |
| * Copyright (c) 2023 by M5Stack | |
| * Equipped with M5Core sample source code | |
| * 配套 M5Core 示例源代码 | |
| * Visit for more information: https://docs.m5stack.com/en/core/gray | |
| * 获取更多资料请访问: https://docs.m5stack.com/zh_CN/core/gray |
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 requests | |
| import pyaudio | |
| import wave | |
| import io | |
| API_KEY = 'YOUR_API_KEY' # ←ご自身のAPIキー | |
| ENDPOINT = 'https://api.aivis-project.com/v1/tts/synthesize' | |
| MODEL_UUID = '使いたいUUID' # ←/v1/list-voicesで取得 | |
| payload = { |
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 <M5Unified.h> | |
| #include <SPIFFS.h> | |
| #include <WiFi.h> | |
| #include <WebServer.h> | |
| #include <ESPmDNS.h> | |
| #define SAMPLE_RATE 8000 // Sampling rate | |
| #define CHUNK 1024 // I2S buffer size | |
| #define PERIAD 10 // Recording time (sec) |
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
| #define LV_COLOR_DEPTH 16 | |
| #define LV_COLOR_16_SWAP 1 | |
| #define LV_MEM_CUSTOM 1 | |
| #define LV_TICK_CUSTOM 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
| ctrl_interface=/var/run/wpa_supplicant | |
| update_config=1 | |
| pmf=1 | |
| sae_pwe=2 | |
| network={ | |
| ssid="YOUR_SSID_01" | |
| psk="YOUR_PASS_01" | |
| priority=5 | |
| id_str="home" |
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 subprocess | |
| import speech_recognition as sr | |
| from gtts import gTTS | |
| import os | |
| import google.generativeai as genai | |
| # ==== 設定 ==== | |
| GEMINI_API_KEY = "YOUR_API_KEY" # ← あなたのAPIキーに変更 | |
| genai.configure(api_key=GEMINI_API_KEY) | |
| model = genai.GenerativeModel(model_name="models/gemini-2.0-flash") |
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
| error[E0433]: failed to resolve: could not find `UsbEndpointType` in `web_sys` | |
| --> /Users/mongonta555/.cargo/registry/src/index.crates.io-6f17d22bba15001f/webusb-web-0.3.0/src/lib.rs:302:22 | |
| | | |
| 302 | web_sys::UsbEndpointType::Bulk => Self::Bulk, | |
| | ^^^^^^^^^^^^^^^ could not find `UsbEndpointType` in `web_sys` | |
| error[E0433]: failed to resolve: could not find `UsbEndpointType` in `web_sys` | |
| --> /Users/mongonta555/.cargo/registry/src/index.crates.io-6f17d22bba15001f/webusb-web-0.3.0/src/lib.rs:303:22 | |
| | | |
| 303 | web_sys::UsbEndpointType::Interrupt => Self::Interrupt, |
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
| servo: | |
| pin: | |
| # ServoPin | |
| # Core1 PortA X:22,Y:21 PortC X:16,Y:17 | |
| # Core2 PortA X:33,Y:32 PortC X:13,Y:14 | |
| # Stack-chanPCB Core1 X:5,Y:2 Core2 X:19,Y27 | |
| # When using SCS0009, x:RX, y:TX (not used).(StackchanRT Version:Core1 x16,y17, Core2: x13,y14) | |
| x: 33 | |
| y: 32 | |
| offset: |
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
| .pio/libdeps/m5stack-fire/ESP32-targz/src/uzlib/genlz77.c:114:30: error: expected declaration specifiers or '...' before '[' token | |
| uint32_t uzlib_checksum_none([[maybe_unused]]const void *data, [[maybe_unused]]unsigned int length, uint32_t prev_sum) | |
| ^ | |
| .pio/libdeps/m5stack-fire/ESP32-targz/src/uzlib/genlz77.c:114:64: error: expected declaration specifiers or '...' before '[' token | |
| uint32_t uzlib_checksum_none([[maybe_unused]]const void *data, [[maybe_unused]]unsigned int length, uint32_t prev_sum) | |
| ^ | |
| .pio/libdeps/m5stack-fire/ESP32-targz/src/uzlib/genlz77.c: In function 'uzlib_deflate_init_stream': | |
| .pio/libdeps/m5stack-fire/ESP32-targz/src/uzlib/genlz77.c:141:28: error: 'uzlib_checksum_none' undeclared (first use in this function) | |
| ctx->checksum_cb = uzlib_checksum_none; | |
| ^~~~~~~~~~~~~~~~~~~ |
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
| #!/bin/bash | |
| # 下記のファイルを作成してください。(作成後、chmod +x /usr/local/m5stack/led.shを忘れずに) | |
| # /usr/local/m5stack/led,sh | |
| # 引数の数をチェック | |
| if [ $# -ne 3 ] ; then | |
| echo "Usage: $0 <brightness r> <brightneee g> <brigntness b>" | |
| exit 1 | |
| fi |
NewerOlder