This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 人物と深度映像を描画する | |
import SimpleOpenNI.*; | |
SimpleOpenNI context; | |
void setup() | |
{ | |
context = new SimpleOpenNI(this); | |
// 深度カメラを有効にする |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sceneは人物だけを表示させる | |
import SimpleOpenNI.*; | |
SimpleOpenNI context; | |
void setup() | |
{ | |
context = new SimpleOpenNI(this); | |
// 人物描画を有効にする |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// スピーカーのピン。もう片方はGNDに。 | |
int speakerPin = 10; | |
// 演奏するメロディ。cがド。 | |
char notes[] = "ccggaag ffeeddc "; | |
// タッチスイッチのしきい値 | |
const long threshold = 100; | |
#include <CapSense.h> | |
#include <stdlib.h> | |
int length = sizeof(notes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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])"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CapSense.h> | |
#include "pitches.h" | |
const int ledPin = 13; | |
const long thresholdH = 25; | |
const long thresholdL = 15; | |
CapSense capSense = CapSense(2, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; |