32
A toolkit to interconnect toolkits Shigeru Kobayashi (mayfair [at] iamas.ac.jp) Sketching in Hardware 3: INTERCONNECTIONS, July 25-27, 2008, RISD

Sketching In Hardware 3

Embed Size (px)

DESCRIPTION

My presentation slides for Sketching in Hardware 3

Citation preview

Page 1: Sketching In Hardware 3

A toolkit to interconnect toolkits

Shigeru Kobayashi (mayfair [at] iamas.ac.jp)

Sketching in Hardware 3: INTERCONNECTIONS, July 25-27, 2008, RISD

Page 2: Sketching In Hardware 3

Introduction

• Roland Corp. (1993∼2004)– Sound designer– Software engineer

• IAMAS (2004∼)– Physical computing– User interface

Page 3: Sketching In Hardware 3

Introduction: Make Magazine (Japanese)

Make: Technology on Your Time Volume 04O’Reilly Japan (2008)

Page 4: Sketching In Hardware 3

Background: Gainer

A toolkit consisting of open-source hardwareand software

• Gainer I/O module– PSoC + FT232RL

• Software libraries– ActionScript 2/3– Processing– Max/MSP

Page 5: Sketching In Hardware 3

Background: Gainer

Open-source hardware

• Gainer PSoC Development Board– Designed by SparkFun Electronics– PSoC based, low cost

• Ginger/Pepper/Sugar– Designed by Morecat Lab– AVR based, low cost

Page 6: Sketching In Hardware 3

Gainer PSoC Development Board

SKU#: DEV-08480

Page 7: Sketching In Hardware 3

Ginger/Pepper

http://web.mac.com/kuwatay/

Page 8: Sketching In Hardware 3

Background: Gainer

Open-source software

• .NET• Perl• PureData• Python• Ruby• Squeak• vvvv

Page 9: Sketching In Hardware 3

Background: Gainer

+GAINERPhysical Computing with Gainer

GainerBook Labo + Kurukuru Lab (2007)

Page 10: Sketching In Hardware 3

Comparison: Gainer vs Arduino

Gainer Arduino DiecimilaPrice US$34.95 US$34.95Pins 16 20A/D 8 (8bit) 6 (10bit)

PWM 8 (8bit) 6 (8bit)User buttons 1 0

User LEDs 1 0Open-source Yes YesStand-alone No Yes

Emphasis Simplicity Expandability

Page 11: Sketching In Hardware 3

Efforts in the classroom at IAMAS

Sketching PrototypingToolkit Gainer Gainer or Arduino

Connection Wired Wired or stand-aloneProgramming PC only PC and/or microcontroller

Material Cardboard WoodStyrofoam 3D printing

Wiring Breadboard Soldering

Page 12: Sketching In Hardware 3

Example: Jamming Gear

• So Kanno• Kenichiro Saigou

Page 13: Sketching In Hardware 3

Motivations to Funnel

Found problems

• An I/O module doesn’t cover all user needs,& changing between toolkits is expensive

• For beginners, it is still difficult to handlereal-world inputs

• Wired connection narrows ideas during‘sketching in hardware’ stage

Page 14: Sketching In Hardware 3

What is Funnel?

• A toolkit to interconnect toolkits• Covers from sketching to prototyping• Intended to be a common language

between designers/artists and engineers

Page 15: Sketching In Hardware 3

What is Funnel?

• A toolkit to interconnect toolkits• Covers from sketching to prototyping• Intended to be a common language

between designers/artists and engineers• Supports pesudo code like programming• Various filters (LPF, scaler, oscillator)• A new I/O module based on Arduino

Page 16: Sketching In Hardware 3

Interconnections via Funnel

USB XBeeDongle

GainerI/O Module

Arduino(with Firmata)

USB XBeeDongle

Funnel Server

ActionScript 3 Processing Max/MSPetc.Ruby

AS3 Library Processing Library OSC LibrariesRuby Library

Funnel I/OMaxStreamXBee

Funnel I/OMaxStreamXBee

Page 17: Sketching In Hardware 3

Interconnections via Funnel

Supported hardware

• Gainer I/O• Arduino (via Firmata v2)• XBee (IEEE 802.15.4/ZigBee)• Funnel I/O

Page 18: Sketching In Hardware 3

Interconnections via Funnel

Supported languages

• Processing• ActionScript 3• Ruby

Page 19: Sketching In Hardware 3

Funnel: Demo environment

action-coding*1

• Interconnections betweenProcessing and JRuby

• Supports runtime rewriting• Developer: Ichitaro Masuda

*1 http://code.google.com/p/action-coding/

Page 20: Sketching In Hardware 3

Funnel: Pseudo code like programming

Example 1 Ruby×Funnel×Arduino Nano

# Control brightness of a screen by a pot

def setupsize 400, 400@aio = Arduino.new :applet => self

end

def drawbackground @aio.analog_pin(2).value * 255

end

Page 21: Sketching In Hardware 3

Funnel: Pseudo code like programming

Example 2 Ruby×Funnel×Arduino Nano

# Apply a filter to smooth inputs

def setup...@fio = Arduino.new :applet => self

f = Convolution.new Convolution::[email protected]_pin(0).filters = [f]...

end

...

Page 22: Sketching In Hardware 3

Funnel: Pseudo code like programming

Example 3 Ruby×Funnel×Gainer I/O

# Start blinking the LED when the button is pressed

@gio = Gainer.new@osc = Osc.new Osc::SQUARE, 1, [email protected] = [@osc]

@gio.button.on RISING_EDGE [email protected]

end

Page 23: Sketching In Hardware 3

Funnel: Pseudo code like programming

Example 4 Ruby×Funnel×Gainer I/O

# Turn on the LED after dark

@gio = [email protected](0).filters = [SetPoint.new 0.3, 0.1]

# threshold, hysteresis

@gio.ain(0).on FALLING_EDGE [email protected] = 1

end

Page 24: Sketching In Hardware 3

FIO: Funnel I/O Module v1.0

• Based on LilyPad v1.6• 3.3V operation• ATMega168V (8MHz)• XBee (IEEE 802.15.4 or ZigBee)• On-board DC/DC (up to 850mA)• Various mini shields• Looking for distributors ;)

Page 25: Sketching In Hardware 3

FIO: Funnel I/O Module v1.0

Page 26: Sketching In Hardware 3

FIO: Funnel I/O Module v1.0

Page 27: Sketching In Hardware 3

FIO: Funnel I/O Module v1.0

Page 28: Sketching In Hardware 3

Demo: Ruby×Funnel×FIO

• 1:1• 1:N (broadcast)

Page 29: Sketching In Hardware 3

Related topics: more interconnections?

action-coding*2

• Developer: Ichitaro Masuda• Utilize Processing API from JRuby• Supports runtime rewriting

*2 http://code.google.com/p/action-coding/

Page 30: Sketching In Hardware 3

Related topics: more interconnections?

rbof*3

• Developer: Ichitaro Masuda• Utilize openFrameworks from Ruby

*3 http://code.google.com/p/rbof/

Page 31: Sketching In Hardware 3

Related topics: more interconnections?

ForCy*4

• Developer: Osamu Tamura• On-chip lightweight compiler• Forth/PostScript like language• Ready to use with Arduino• If combined with runtime rewriting...

*4 http://www.recursion.jp/forcy/

Page 32: Sketching In Hardware 3

A toolkit to interconnect toolkits

Shigeru Kobayashi (mayfair [at] iamas.ac.jp)

Sketching in Hardware 3: INTERCONNECTIONS, July 25-27, 2008, RISD