Skip to content

Instantly share code, notes, and snippets.

@hiroeorz
hiroeorz / Firmataプロトコル.md
Last active October 15, 2023 05:04
firmataプロトコル覚え書き

Firmataプロトコル概要 (Ver 2.3)

FirmataはPC - マイコン間でやり取りするためのプロトコルです。汎用入出力の値の取得・書き込みその他の操作をPC側からArduinoのようなマイコンに対して行う為に使用されます。

firmata.org

Arduinoでの使用

ArduinoでFirmataプロトコルを使用してホストコンピュータとやり取りする場合は、ArduinoIDEを立ち上げて、ファイル -> スケッチの例 -> Firmata -> Standard Firmata を選択、開きそのままArduinoに書き込めば良いです。

##プロトコルフォーマット

$ esrally compare --baseline=1c423b56-5aec-4767-adfc-a00ec4784358 --contender=0a9b5eb2-b74a-4c96-ab4e-355c2e51e426
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
@hiroeorz
hiroeorz / gist:7594153
Last active December 29, 2015 01:39
RubyWorld Conference 2013でのGitHubのCEO、Tom Prestonによる講演

The Internet Axiom: Escaping the Tyranny of Time and Space

  • タイトル日本語訳: インターネットの原理: 時間と距離の圧政からの解放
  • 講演者: Tom Preston-Werner (GitHub Inc. CEO)

(一部メモが間に合わなかったところを ツイッターの #rubyworld から引用させて頂きました)

背景

Tom Preston-Wernerは世界中のプログラマー同士のコラボレーションサービスGitHub(ギットハブ)の共同創業者のうちの一人。

@hiroeorz
hiroeorz / gist:4407647
Created December 29, 2012 15:40
Controlling LED on beagleboard-xm on Ubuntu Linux from Ruby.
# control led on beagleboard.
class BeagleBoardXmLed
LED_FILE_FORMAT =
"/sys/devices/platform/leds-gpio/leds/beagleboard::@name@/brightness"
# led: ledname (usr0 : usr1 : pmu_stat)
def on(led)
control(led, 1)
end
$ git clone https://github.com/basho/riak-ruby-client.git
$ cd riak-ruby-client
$ bundle install --path vendor/bundle
$ bundle exec irb
>
@hiroeorz
hiroeorz / reltool.config
Created June 17, 2012 11:49
Erlangリリースパッケージ生成ツール用設定ファイルのサンプル
{sys, [
{lib_dirs, ["../deps"]}, %% depsを追加
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "hogeapplication", "0.1",
[
%% 標準で使うライブラリも全て追加
kernel,
stdlib,
sasl,
@hiroeorz
hiroeorz / GN_ViewController.m
Created May 18, 2012 01:53
カスタムテーブルサンプル
#import "GN_ViewController.h"
#import "GN_CustomCell.h"
@interface GN_ViewController (Local)
- (void)helloTable;
@end
@hiroeorz
hiroeorz / GN_ViewController.h
Created May 18, 2012 01:55
カスタムテーブルサンプルヘッダファイル
#import <UIKit/UIKit.h>
@interface GN_ViewController : UIViewController<UITableViewDelegate, UITableViewDataSource> {
}
@property (nonatomic, strong) NSArray *namesArray;
@property (nonatomic, strong) NSArray *imagesArray;
@end
@hiroeorz
hiroeorz / redis_test.erl
Created October 9, 2011 17:55
eredisのテスト
-module(redis_test).
-define(KEY, <<"sample">>).
-export([push_to_list/1, parallel_push_to_list/2, get_from_list/2, delete/0]).
%%--------------------------------------------------------------------
%% @doc Count件数のデータをリストに追加し、最終的な件数と経過時間を表示する.
%%--------------------------------------------------------------------
push_to_list(Count) ->
@hiroeorz
hiroeorz / .globalrc
Created April 23, 2011 07:49 — forked from takaokouji/.globalrc
global using rtags
#
# Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003
# Tama Communications Corporation
#
# This file is part of GNU GLOBAL.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#