Skip to content

Instantly share code, notes, and snippets.

View YuuichiAkagawa's full-sized avatar

Yuuichi Akagawa YuuichiAkagawa

View GitHub Profile
@YuuichiAkagawa
YuuichiAkagawa / hiragana.bas
Last active February 12, 2021 11:11
ひらがな表示 BASICリスト
5 '(c)1989 DEKO
10 '*** INIT ***
20 KEY 4, "POKE &BFC93,&80,&FA,&B"+CHR$ 13
30 KEY 5, "POKE &BFC93,&58,&25,&F"+CHR$ 13
40 POKE &BFE03,&1A,&FD,&0B,&80,&01,&00 :CALL &FFFD8
50 '***MAIN***
60 *A:CLS :LOCATE 12,0:PRINT "*** ヒラガナ ***":LOCATE 10,2:PRINT "シバラクオマチクダサイ・・・。":B=0
70 FOR L=0 TO 63:FOR I=0 TO 5:IF I=5THEN A$="00":GOTO 90
80 READ A$
90 POKE (&BFA80+B),VAL ("&H"+A$):B=B+1
@YuuichiAkagawa
YuuichiAkagawa / USBMIDI_desc.ino
Created July 12, 2020 03:50
USB MIDI descriptor info for USB Host Shield 2.0 Library
/* USBMIDI_desc
* modified from USB_desc.ino
*/
#include <usbhub.h>
#define BUFFER_SIZE 512
#define CS_INTERFACE (0x24)
#define CS_ENDPOINT (0x25)
#define LOBYTE(x) ((char*)(&(x)))[0]
#define HIBYTE(x) ((char*)(&(x)))[1]
Start
01
--
Device descriptor:
Descriptor Length: 12
Descriptor type: 01
USB version: 0110
@YuuichiAkagawa
YuuichiAkagawa / SPI.h
Last active April 13, 2019 01:29
SPI.transfer16() support for GR-ROSE(v.0.91)
/*
* Copyright (c) 2010 by Cristian Maglie <c.maglie@arduino.cc>
* Copyright (c) 2014 by Paul Stoffregen <paul@pjrc.com> (Transaction API)
* Copyright (c) 2014 by Matthijs Kooijman <matthijs@stdin.nl> (SPISettings AVR)
* Copyright (c) 2014 by Andrew J. Kroll <xxxajk@gmail.com> (atomicity fixes)
* SPI Master library for arduino.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
@YuuichiAkagawa
YuuichiAkagawa / 00README.md
Last active March 10, 2019 04:10
Keyboard bridge for Let's note CF-SZ5

Let's note CF-SZ5でHHKBを尊師スタイルで使うためのKeyboard bridge

バード電子さんからHHKBオプション品としてキーボードブリッジが発売されていますが、CF-SZ5には適合しないので、自分で作ってみました。

image1

image2

KBBridge-LN_CF-SZ5.zipをEmerge+さんのレーザー加工サービスでカットして貰ってください。 (A3サイズなので、2つ分入ってます。)

滑り止めのゴム足はクリアで小さいのを探したところ、和気産業さんのソフトクッション CN-020が入手性も含め良い感じでした。

@YuuichiAkagawa
YuuichiAkagawa / hhkdaltcontroller_revN_BOM.md
Last active February 3, 2019 08:40
HHKB Alt controller Rev.N BOM

Bill of Matrials - HHKB Alt controller Rev.N (2019/2/3現在)

Name Qty Parts# Detail where to buy
USB-mini connector 1 J1 Hirose UX60SC-MB-5S8 マルツ https://www.marutsu.co.jp/pc/i/30392282/ @135
ATMega32U4-AU 1 U1 TQFP44 秋月 I-09835 @640
Xtal-16MHz 1 X1 HC49 SMT 秋月 P-01767@200(5pcs)
C22p 2 C5,C6 1608 秋月 P-11626 @100(40pcs) GRM1882C1H220JA01
C1u 1 C4 1608 +-10% EMK107BJ105KA-T 秋月 P-05731 @200(100pcs)
C0.1u 5 C3,C7,C8,C9,C10 1608 for decoupling 秋月 P-13374 @100(40pcs) GRM188F11104ZA01
#include <usbh_midi.h>
#include <usbhub.h>
USB Usb;
//USBHub Hub(&Usb);
USBH_MIDI Midi(&Usb);
typedef enum {
nonsysex = 0,
ok = 1,
@YuuichiAkagawa
YuuichiAkagawa / micropython_motor_test.py
Last active September 9, 2017 11:59
OpenMVカメラでGrove I2C Motor Driverテスト
import utime
from machine import I2C, Pin, info
i2c = I2C(sda=Pin('P5'), scl=Pin('P4'), freq=100000)
i2caddr = 0xf
#set frequence(3921Hz)
buf = bytearray([0x84, 0x02, 0x01])
i2c.writeto(i2caddr, buf)
utime.sleep_ms(4)
@YuuichiAkagawa
YuuichiAkagawa / NanoPiNEO_setup_memo.md
Last active July 17, 2017 02:39
NanoPi NEO初期設定メモ
@YuuichiAkagawa
YuuichiAkagawa / gist:1fe8790026af469732ebdc22ad1d9964
Created April 30, 2017 15:50
esptool.py for GR-LYCHEE CDC ACM
$ diff -up esptool.py.orig esptool.py
--- esptool.py.orig 2017-04-23 23:17:06.861069200 +0900
+++ esptool.py 2017-05-01 00:42:24.731308500 +0900
@@ -125,7 +125,9 @@ class ESPLoader(object):
# Maximum block sized for RAM and Flash writes, respectively.
ESP_RAM_BLOCK = 0x1800
- FLASH_WRITE_SIZE = 0x400
+ #workaround for GR-LYCHEE CDC ACM
+# FLASH_WRITE_SIZE = 0x400