Skip to content

Instantly share code, notes, and snippets.

#read punched tape
#MaixPy参考にしたサイト
#https://qiita.com/Lathe/items/7aeea7beaf05dbf8a539
#https://qiita.com/Lathe/items/0f0c9b75928d52a7d502
import sensor, image, time, lcd
lcd.init(freq=15000000)
sensor.reset()
@shikarunochi
shikarunochi / MZ-700GRAPH.html
Last active June 26, 2024 02:03
MZ-700ジョイフルパック掲載のグラフプログラムをJavaScript Canvasで描画
<!DOCTYPE html>
<html lang="ja">
<!--
国立図書館デジタルコレクション MZ-700ジョイフルパック のプログラムをベースにしています。
https://dl.ndl.go.jp/pid/12631887/1/75
-->
<head>
<meta charset="UTF-8">
<title>MZ-700 GRAPH</title>
<script type="text/javascript">
@shikarunochi
shikarunochi / M5GFX_ST7789.h
Last active October 18, 2024 01:57
M5Unified: Using ExtLCD Display
#ifndef __M5GFX_ST7789__
#define __M5GFX_ST7789__
#include <lgfx/v1/panel/Panel_ST7789.hpp>
#include <M5GFX.h>
class M5GFX_ST7789 : public M5GFX
{
lgfx::Bus_SPI::config_t _bus_cfg;
@shikarunochi
shikarunochi / EXTLCD.ino
Last active November 7, 2024 16:06
M5Atom : EXT LCD(without CS pin) + SD Card
#include <SD.h>
#include <SPI.h>
#include <M5Unified.h>
#include "lgfx_ST7789.h"
LGFX_ST7789 m5lcd;
void setup(){
Serial.begin(115200);
//CSなしLCDをspi_mode=0で動作させるための処理
constexpr int PANEL2_RST = 19; // 外部LCDのRSTピン番号
@shikarunochi
shikarunochi / TextAssistant.ino
Last active February 6, 2025 09:55
M5Stack LLM Module に M5Facesキーボードから入力
/*
* SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
* SPDX-License-Identifier: MIT
* M5Stack LLM Module で日本語対話。Serial MonitorでBoth BL&CRを設定するとよいです。
*
* 変更元プログラム:https://gist.github.com/ksasao/37425d3463013221e7fd0f9ae5ab1c62
* Faces keyboard対応 2025/01/25 @shikarunochi
*/
#include <Arduino.h>
#include <M5Unified.h>
@shikarunochi
shikarunochi / RomaKanaHenkan.h
Last active February 6, 2025 09:54
M5Stack LLM Module に M5Facesキーボードから入力。ひらがな・カタカナ変換対応
#include<M5Unified.h>
String romaHenkan[][4] = {
"-", "ー" ,"ー","",
"n'", "ん" ,"ン","",
"xtsu","っ" ,"ッ","",
"kk","っ" ,"ッ","k",
"ss","っ" ,"ッ","s",