Skip to content

Instantly share code, notes, and snippets.

View YuuichiAkagawa's full-sized avatar

Yuuichi Akagawa YuuichiAkagawa

View GitHub Profile
Arduino: 1.6.8 (Windows 7), Board: "Arduino/Genuino Uno"
D:\develop\arduino-1.6.8\arduino-builder -dump-prefs -logger=machine -hardware "D:\develop\arduino-1.6.8\hardware" -hardware "C:\Users\akagawa\AppData\Local\Arduino15\packages" -hardware "D:\develop\Projects\Arduino\hardware" -tools "D:\develop\arduino-1.6.8\tools-builder" -tools "D:\develop\arduino-1.6.8\hardware\tools\avr" -tools "C:\Users\akagawa\AppData\Local\Arduino15\packages" -built-in-libraries "D:\develop\arduino-1.6.8\libraries" -libraries "D:\develop\Projects\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10608 -build-path "D:\users\akagawa\Temp\buildd45e51efecc2076611979ea3c516660c.tmp" -warnings=all -prefs=build.warn_data_percentage=75 -verbose "D:\develop\Projects\Arduino\libraries\USB_Host_Shield_2\examples\Bluetooth\WiiMulti\WiiMulti.ino"
D:\develop\arduino-1.6.8\arduino-builder -compile -logger=machine -hardware "D:\develop\arduino-1.6.8\hardware" -hardware "C:\Users\akagawa\AppData\Local\Arduino15\packages" -hardware "D:\develo
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
This software may be distributed and modified under the terms of the GNU
General Public License version 2 (GPL2) as published by the Free Software
Foundation and appearing in the file GPL2.TXT included in the packaging of
this file. Please note that GPL2 Section 2[b] requires that all works based
on this software must also be made publicly available under the terms of
the GPL2 ("Copyleft").
Contact information
// Poll USB MIDI Controler and send to serial MIDI
void MIDI_poll()
{
uint8_t size;
uint8_t recvBuf[MIDI_EVENT_PACKET_SIZE];
uint8_t rcode = 0; //return code
uint16_t rcvd;
uint8_t readPtr = 0;
@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
@YuuichiAkagawa
YuuichiAkagawa / NanoPiNEO_setup_memo.md
Last active July 17, 2017 02:39
NanoPi NEO初期設定メモ
@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)
#include <usbh_midi.h>
#include <usbhub.h>
USB Usb;
//USBHub Hub(&Usb);
USBH_MIDI Midi(&Usb);
typedef enum {
nonsysex = 0,
ok = 1,
@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
@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 / SPI.h
Last active April 13, 2019 01:29
SPI.transfer16() support for GR-ROSE(v.0.91)
/*
* Copyright (c) 2010 by Cristian Maglie <[email protected]>
* Copyright (c) 2014 by Paul Stoffregen <[email protected]> (Transaction API)
* Copyright (c) 2014 by Matthijs Kooijman <[email protected]> (SPISettings AVR)
* Copyright (c) 2014 by Andrew J. Kroll <[email protected]> (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