Skip to content

Instantly share code, notes, and snippets.

View kaiware007's full-sized avatar

kaiware007 kaiware007

View GitHub Profile

Reverse Engineering SP110e LED Controller

Through Bluetooth sniffing, using this method I've been able to (semi reliably) control the SP110e controller via Homebridge.

You can find this controller for very cheap here: https://www.aliexpress.com/item/4000773623427.html?spm=a2g0o.productlist.0.0.4f09329cJ7C1H4&algo_pvid=542e757b-587f-4540-8652-2195883f1349&algo_expid=542e757b-587f-4540-8652-2195883f1349-0&btsid=0bb0622a16012309671478585ed4bd&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

This entire guide is for Bluetooth LE libraries, and uses hexidecimal.

LE configuration

@mattatz
mattatz / GradientTexGen
Created November 28, 2016 04:14
Gradient Texture2D Generator for Unity.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System.IO;
using System.Collections;
namespace mattatz.Utils {
@mattatz
mattatz / WindowControl.cs
Last active December 20, 2023 01:49
Unityの画面の位置や解像度の指定、タイトルバーの消去などを行うユーティリティ
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;
namespace Utils {
// ここからコードを拝借させてもらいました!
// http://answers.unity3d.com/questions/13523/is-there-a-way-to-set-the-position-of-a-standalone.html
@sehm
sehm / AssetDatabaseHelper.CreateAsset.cs
Last active June 21, 2017 06:46
Unity Editor スクリプト:参照切れ(missing) を起こさない CreateAsset() AssetDatabase.CreateAsset() ですでにあるアセットを作成すると、管理IDが変わってしまうために参照切れが起こる
using UnityEngine;
using UnityEditor;
public class AssetDatabaseHelper
{
// Editor スクリプト : 指定パスに指定アセットを書き込む. ない場合は新規作成.
// AssetDatabase.CreateAsset() ですでにあるアセットを作成すると、管理IDが変わってしまうために参照切れ(missing)が起こる。
void CreateAsset(Object newAsset,string path,System.Type type)
{
var asset = AssetDatabase.LoadAssetAtPath(path,type);
@mattatz
mattatz / LabColorspace.cginc
Created November 25, 2015 05:35
Conversion between RGB and LAB colorspace shader for Unity.
#ifndef __LAB_COLORSPACE__
#define __LAB_COLORSPACE__
/*
* Conversion between RGB and LAB colorspace.
* Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138
*/
float3 rgb2xyz( float3 c ) {
float3 tmp;
@marukun318
marukun318 / Build.cs
Created March 6, 2015 07:02
Unity5で選択したファイルにアセットバンドルの名前を自動で付ける
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public class BuildScript
{
const string kAssetBundlesOutputPath = "AssetBundles";
// アセットバンドル化するフォルダの設置場所
@keijiro
keijiro / lets-make-a-synth-with-unity.md
Created September 30, 2012 11:10
Unity でシンセを作る

Unity でシンセを作る

Harmoni という名前の iOS アプリを App Store にサブミットしました。このシンセアプリはゲームエンジン Unity を使って実装されています。

ここでは Unity を使ってシンセを実装するにあたっての心得(?)について記します。

前提

サンプリングベースのリズムマシン等であれば basic 版でも実装可能ですが、スクリプトで合成した波形を使うには、Pro 版でないとキツいです。後述しますが、実装にオーディオフィルタを使うためです。