Skip to content

Instantly share code, notes, and snippets.

View tinytintoy's full-sized avatar

TAKASAKI Yusuke tinytintoy

View GitHub Profile
@tinytintoy
tinytintoy / iTunes m4a(aac) Podcast.md
Last active October 21, 2017 04:04
aac をiTunesでPodcastとして認識させる
  • aac ではダメで m4a にしないとダメ。

  • さらに m4a にメタデータの追加が必要。

pcst=1

pcst は podcast の意。iTunes 用の独自メタデータ。

@tinytintoy
tinytintoy / attiny95_oled.md
Last active September 20, 2017 14:18
ATtiny85 で I2C 接続の OLED を制御する

SSD1306 を使用した 0.96 インチの OLED を、ATtiny85 で I2C 接続で制御したい。

ATTiny85 での動作確認は、ソフトウェアの書き込みが手間なので開発は Arduino pro mini 3.3V を使う。

Arduino pro mini ではハードウェア I2C が使用できるが、Arduino 化した ATtiny85 ではできない。 そこでソフトウェアで I2C 通信ができる TinyWireM ライブラリを使用する。

開発用 Arduino pro mini では 0.96 OLED の制御を OzOLED で Wire ライブラリ経由で行う。 ATtiny85 では、TinyOzOLED でTinyWireM ライブラリ経由で行う。

@tinytintoy
tinytintoy / gifAnime2binImage.py
Last active September 19, 2017 04:06 — forked from jitomesky/gifAnime2binImage.py
GIFアニメ画像を2値化してArduino用のヘッダファイルを出力するプログラム / 64x64 の白黒二値画像を ATtiny85 で使用するフォーク
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import sys
sys.path.append('/usr/local/lib/python2.7/site-packages')
import cv2
from PIL import Image, ImageSequence, ImageDraw
import time
import unittest
float r, theta, drop_speed, dot_size;
PVector center;
ArrayList<Dot> dots;
PImage ref, ref_strip;
void setup(){
size(1280,720);
frameRate(60);
fill(255);
noStroke();
@tinytintoy
tinytintoy / gist:6133145
Created August 1, 2013 16:49
Fireworks #1
/*
* [021] Fireworks #1
*
* 2013 [+++] @tinytintoto
*/
ArrayList<Fire> fires = new ArrayList<Fire>();
int initialSize;
float sleshold = 0.5;
void setup(){
@tinytintoy
tinytintoy / N020_MangaLinework002
Created July 24, 2013 02:45
Manga Linework #2; Perception
/*
* [020] Manga Linework #2; Perception
*
* 2013 [+++] @tinytintoto
*/
LineworkDrawer ld = new LineworkDrawer();
PVector center_loc;
void setup() {
size( 500, 280 );