Skip to content

Instantly share code, notes, and snippets.

View tatsuro-ueda's full-sized avatar

Tatsuro Ueda tatsuro-ueda

View GitHub Profile
@tatsuro-ueda
tatsuro-ueda / SceneDepth.pde
Created January 31, 2012 05:04
simple-OpenNI sample SceneDepth
// 人物と深度映像を描画する
import SimpleOpenNI.*;
SimpleOpenNI context;
void setup()
{
context = new SimpleOpenNI(this);
// 深度カメラを有効にする
@tatsuro-ueda
tatsuro-ueda / Scene.pde
Created January 31, 2012 04:57
simple-OpenNI sample Scene
// Sceneは人物だけを表示させる
import SimpleOpenNI.*;
SimpleOpenNI context;
void setup()
{
context = new SimpleOpenNI(this);
// 人物描画を有効にする
// スピーカーのピン。もう片方はGNDに。
int speakerPin = 10;
// 演奏するメロディ。cがド。
char notes[] = "ccggaag ffeeddc ";
// タッチスイッチのしきい値
const long threshold = 100;
#include <CapSense.h>
#include <stdlib.h>
int length = sizeof(notes);
#include <CapSense.h>
const long thresholdH = 100;
const long thresholdL = 50;
#include <stdlib.h>
int speakerPin = 10;
char notes[] = "ccggaag ffeeddc "; // a space represents a rest
function getTweetAverageLength(){
var sheet = SpreadsheetApp.getActiveSheet();
var last_row = sheet.getLastRow();
var twitter_id = sheet.getRange(last_row, 2).getValues();
var last5text = getTweet(twitter_id);
sheet.getRange(last_row,3).setValue(last5text[0]);
sheet.getRange(last_row,4).setFormulaR1C1("LEN(RC[-1])");
sheet.getRange(last_row,5).setValue(last5text[1]);
sheet.getRange(last_row,6).setFormulaR1C1("LEN(RC[-1])");
require "rubygems"
require "google_spreadsheet"
require "wincom"
# Logs in.
# You can also use OAuth. See document of GoogleSpreadsheet.login_with_oauth for details.
session = GoogleSpreadsheet.login("[email protected]", "xxxxxxxx")
# First worksheet of http://spreadsheets.google.com/ccc?key=0Alza9Zlbo6NidHk1NjhVQzVkalQzLXdrMzh0c1YwcUE&hl=ja
worksheet = session.spreadsheet_by_key("0Alza9Zlbo6NidHk1NjhVQzVkalQzLXdrMzh0c1YwcUE").worksheets[0]
#include <CapSense.h>
#include "pitches.h"
const int ledPin = 13;
const long thresholdH = 25;
const long thresholdL = 15;
CapSense capSense = CapSense(2, 3);
const int xAxisPin = 0;
const int yAxisPin = 1;
const int zAxisPin = 2;
int ledAnodePin = 8;
int ledRedPin = 11;
int ledGreenPin = 10;
int ledBluePin = 9;
void led_on(int red, int green, int blue){
float filterK = 0.1; // フィルタ係数 0に近くなるほど強くなる 1.0で効果なし
int Bairitu = 4;
// Original: Arduino - Sound Sensor
// 2009.1.12 by SatE-O
// Processing 1.0.1
import processing.serial.*;
Serial port;
PFont fontA;
/*
A.P. Shield Demo Program
Created by @shigaku / koress project
http://koress.jp/
http://twitter.com/shigaku
*/
int sensorPin = 4;
int ledPin = 13;
int sensorValue = 0;