67WS Seminar Event

1,521 views
1,456 views

Published on

The slides for the 67WS seminar event on 2009.04.17.

Published in: Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,521
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

67WS Seminar Event

  1. 1. http://67.org/ws/ Funnel ActionScript
  2. 2. • 1 13:00 14:30 – – Funnel – Funnel Gainer – Funnel • 2 14:45 16:15 – FIO Funnel I/O ∗ Arduino ∗ XBee – Funnel 009 –
  3. 3. • 1970 • 1993 2004 – – – • IAMAS 2004 – – –
  4. 4. • • •
  5. 5. Make Volume 04 Sketch 2008
  6. 6. Make Volume 05 Sketch / Prototype 2008
  7. 7. Make Volume 06 Prototyping Lab: 2009
  8. 8. GAINER GainerBook Labo 2007 2008
  9. 9. Making Things Talk Arduino Tom Igoe 2008
  10. 10. • ITP*1 Tom Igoe • 1 • • 1 *1 Interactive Telecommunications Program
  11. 11. PC • ASCII • 1 bps
  12. 12. Alto (1973) http://toastytech.com/guis/
  13. 13. • • • • • •
  14. 14. • • • littleBits coffemaker*2 *2 http://www.vimeo.com/1389390
  15. 15. • – – • – –
  16. 16. 1 • • • ×XBee×Funnel×PC • Make: Tokyo Meeting 01-02 IAMAS Gangu Project
  17. 17. 2 Jamming Gear • × • – – • ×FIO×Max/MSP×PC • Make: Tokyo Meeting 01-02 IAMAS Gangu Project
  18. 18. HELLO!! • 2007.12.22-23 • • 19 • • Processing×Funnel×Gainer I/O
  19. 19. PIC AVR program A a0]=ain.o; aout.1 = 255; B C D
  20. 20. PC Arduino Wiring program A a0]=ain.o; aout.1 = 255; B C D PC program a0]=ain.o; aout.1 = 255;
  21. 21. Arduino I/O SparkFun Electronics
  22. 22. I/O PC Gainer Phidgets A B C D PC program a0]=ain.o; aout.1 = 255;
  23. 23. Phidgets
  24. 24. Gainer • I/O • – ActionScript 2/3 – Processing – Max/MSP
  25. 25. Gainer I/O
  26. 26. I/O
  27. 27. I/O
  28. 28. LED
  29. 29. • –2 – GND – V
  30. 30. • – – A
  31. 31. • – – Ω
  32. 32. • 1,000 1kΩ • 1,000,000 1MΩ • 1,000 1 1mA • 1 50µA 1,000,000
  33. 33. • •
  34. 34. +5V GND
  35. 35. LED
  36. 36. • • – – –
  37. 37. • • •
  38. 38. LED
  39. 39. LED • LED 20mA • • •
  40. 40. V =I ×R •V V •I A •R Ω
  41. 41. − LED ×R = LED R − LED R= LED 5.0V LED 1.8V 10mA 5 − 1.8 3.2 R= = = 0.01 0.01
  42. 42. LED
  43. 43. • +5V • GND •
  44. 44. LED NG
  45. 45. LED
  46. 46. LED 7
  47. 47. Funnel Gainer • GUI •
  48. 48. Funnel • • •
  49. 49. Funnel • – – – – •
  50. 50. Funnel • • •
  51. 51. Bill Moggridge, Designing Interactions (2006)
  52. 52. Funnel Gainer • Gainer – – Gainer I/O 1:1 • Funnel – – Arduino XBee
  53. 53. Funnel Sketching User Experiences Getting the Design Right and the Right Design Bill Buxton Morgan Kaufmann Pub 2007
  54. 54. Funnel Bill Buxton, Sketching User Experiences (2008)
  55. 55. Funnel Bill Buxton, Sketching User Experiences (2008)
  56. 56. Funnel • GUI • – Convolution – SetPoint – Scaler – Osc • I/O
  57. 57. Funnel
  58. 58. Gainer I/O 2 • din 0 1 2 – – • ain 0 1 256 – –
  59. 59. din 0
  60. 60. din 0
  61. 61. • • – rising edge – falling edge
  62. 62. 1 var wasPressed:boolean = false; // gio.onReady = function() { gio.beginDigitalInput(); _root.onEnterFrame = function() { var isPressed:boolean = gio.digitalInput[0]; // if (!wasPressed && isPressed) { // 0 1 } else if (wasPressed && !isPressed) { // 1 0 } wasPressed = isPressed; // }; };
  63. 63. Funnel 2 var gio:Gainer = new Gainer(); gio.digitalInput(0).addEventListener(RISING_EDGE, function(e:Event):void { // 0 1 }); gio.digitalInput(0).addEventListener(FALLING_EDGE, function(e:Event):void { // 1 0 });
  64. 64. ain 0
  65. 65. ain 0
  66. 66. ain 0 • GainerSignalScope • • ain 1 •
  67. 67. ain 0 CdS
  68. 68. ain 0 CdS
  69. 69. ain 0 CdS • • GainerSignalScope • •
  70. 70. Gainer.remap() 3 Gainer.remap() import gainer.*; var gio:Gainer = new Gainer(quot;localhostquot;, 2000, Gainer.MODE1, true); gio.onReady = function() { gio.beginAnalogInput(); _root.onEnterFrame = function() { var val:Number; var frames:Number = movieClip._totalframes; //ain 0 0-255 val = Math.round(Gainer.remap(gio.analogInput[0], 0, 255, 1, frames)); _root.movieClip.gotoAndStop(val); }; };
  71. 71. Scaler 4 Scaler gio = new Gainer(); gio.analogInput(0).filters = [new Scaler(0.2, 0.6, 0, 1, Scaler.LINEAR, true)];
  72. 72. • – – •
  73. 73. 1 2 51 2 set point.fla var threshold:Number = 127; // var hysteresis:Number = 10; // var lastState:Number = -1; // gio.onReady = function() { gio.beginAnalogInput();
  74. 74. 1 2 61 2 _root.onEnterFrame = function() { var state:Number = lastState; var val:Number = gio.analogInput[0]; if (val < threshold) { state = 0; } else { state = 1; } if (lastState != state) { // } lastState = state; }; };
  75. 75. 1 2 71 2 _root.onEnterFrame = function() { var state:Number = lastState; var val:Number = gio.analogInput[0]; if (val < (threshold - hysteresis)) { state = 0; } else if (val > (threshold + hysteresis)) { state = 1; } if (lastState != state) { // } lastState = state; }; };
  76. 76. SetPoint 8 SetPoint gio = new Gainer(); gio.analogInput(0).filters = [new SetPoint([0.5, 0.1])]; gio.analogInput(0).addEventListener(RISING_EDGE, onRisingEdge); gio.analogInput(0).addEventListener(FALLING_EDGE, onFallingEdge);
  77. 77. ain 0
  78. 78. ain 0
  79. 79. ain 0 SoftPot
  80. 80. ain 0 SoftPot
  81. 81. ain 0 SoftPot • • •
  82. 82. ain
  83. 83. ain
  84. 84. • •
  85. 85. • • -1 +1 • sin •
  86. 86. • • LPF • HPF
  87. 87. 9 MovingAverageFilter.as class MovingAverageFilter { private var _taps:Number; // private var _values:Array; // function MovingAverageFilter(taps:Number) { _taps = taps; _values = new Array(_taps); } function processSample(sample:Number):Number { var acc:Number = 0; var i:Number = 0; // _values[0] = sample;
  88. 88. 10 // for (i = 0; i < _taps; i++) { acc = acc + _values[i]; } acc = acc / _taps; // 1 // [A][B][C][D][E] ... // [A][A][B][C][D] ... for (i = _taps - 1; i > 0; i--) { _values[i] = _values[i - 1]; } return acc; } }
  89. 89. Gainer 11 MovingAverageFilter var gio:Gainer = new Gainer(quot;localhostquot;, 2000, Gainer.MODE1, true); // var smoothFilter:MovingAverageFilter = new MovingAverageFilter(8); function loop():Void { var val:Number = smoothFilter.processSample(this.analogInput[0]); ...
  90. 90. Convolution 12 Convolution gio = new Gainer(); gio.analogInput(0).filters = [new Convolution(Convolution.MOVING_AVERAGE)];
  91. 91. 13 public function GainerAccelerometer() { gio = new Gainer(); board = new Shape(); ... this.addChild(board); var smoother:Convolution = new Convolution(Convolution.MOVING_AVERAGE); var scaler:Scaler = new Scaler(0.30, 0.70, -1, 1, Scaler.LINEAR, true); gio.analogInput(1).filters = [smoother, scaler]; addEventListener(Event.ENTER_FRAME, loop); } private function loop(event:Event):void { board.rotation = Math.asin(gio.analogInput(1).value) / Math.PI * 180; }
  92. 92. Gainer I/O 2 • dout 0 1 2 – LED – • *3 aout 0 255 256 – LED – *3 PWM
  93. 93. 14 I/O LED public function GainerLED() { ... var circle:Sprite = new Sprite(); ... this.addChild(circle); circle.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed); circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased); } private function mousePressed(e:MouseEvent):void { gio.led.value = 1; } private function mouseReleased(e:MouseEvent):void { gio.led.value = 0; }
  94. 94. 15 I/O LED LED button.fla public function GainerLED() { gio = new Gainer(); gio.button.addEventListener(PinEvent.RISING_EDGE, buttonPressed); gio.button.addEventListener(PinEvent.FALLING_EDGE, buttonReleased); } private function buttonPressed(e:PinEvent):void { gio.led.value = 1; } private function buttonReleased(e:PinEvent):void { gio.led.value = 0; }
  95. 95. dout 0 LED
  96. 96. dout 0 LED
  97. 97. 16 LED public function GainerLED() { ... var circle:Sprite = new Sprite(); ... this.addChild(circle); circle.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed); circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased); } private function mousePressed(e:MouseEvent):void { gio.digitalOutput(0).value = 1; } private function mouseReleased(e:MouseEvent):void { gio.digitalOutput(0).value = 0; }
  98. 98. aout 0 LED
  99. 99. aout 0 LED
  100. 100. 17 x LED public function GainerLED() { gio = new Gainer(); stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved); gio.analogOutput(0).filters = [new Scaler(0, 199, 0, 1, Scaler.LINEAR, true)]; } private function mouseMoved(e:MouseEvent):void { gio.analogOutput(0).value = e.stageX; }
  101. 101. Osc LED 18 Osc LED public function GainerLED() { ... circle.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed); circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased); gio.analogOutput(0).filters = [new Osc(Osc.SQUARE, 0.5, 1, 0, 0)]; } private function mousePressed(e:MouseEvent):void { gio.analogOutput(0).filters[0].start(); } private function mouseReleased(e:MouseEvent):void { gio.analogOutput(0).filters[0].stop(); gio.analogOutput(0).value = 0; }
  102. 102. FIO (Funnel I/O) • LilyPad Arduino v1.6 • • XBee
  103. 103. FIO (Funnel I/O) v1.3
  104. 104. FIO (Funnel I/O) v1.3
  105. 105. FIO (Funnel I/O) v1.3 - +
  106. 106. FIO (Funnel I/O) v1.3
  107. 107. FIO v1.3 vs Funnel IO Remixed
  108. 108. Arduino • Hernando Barrag´n IDII*4 a Wiring • • IDE Arduino I/O *4 Interaction Design Institute Ivrea
  109. 109. Wiring SparkFun Electronics
  110. 110. Arduino Duemilanove SparkFun Electronics
  111. 111. Arduino IDE
  112. 112. • – – •
  113. 113. LilyPad Arduino SparkFun Electronics
  114. 114. Arduino Pro Mini SparkFun Electronics
  115. 115. Arduino ProtoShield SparkFun Electronics
  116. 116. Arduino XBee Shield SparkFun Electronics
  117. 117. Arduino GND +5V GND
  118. 118. Gainer vs Arduino Gainer Arduino Duemilanove 16 20 RX/TX A/D 8 8bit 6 10bit PWM 8 8bit 6 8bit LED 1 0 LED 1 1 D13 Yes Yes No Yes
  119. 119. Arduino • • • •
  120. 120. Arduino LED 19 Arduino LED int ledPin = 13; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); }
  121. 121. C LED 20 C LED #include <avr/io.h> #include <avr/pgmspace.h> #include <avr/delay.h> #define CLK_CALIB_DATA (FLASHEND - 3) void init() { uint8_t osccal_data = pgm_read_byte(CLK_CALIB_DATA); if (osccal_data != 0xff) OSCCAL = osccal_data; DDRB = 0xff; DDRD = 0xff; return; }
  122. 122. C LED 21 C LED void delay_ms(uint16_t t) { while (t--) _delay_ms(1); } int main(void) { init(); for (; ;) { PORTB = 0xff; delay_ms(500); PORTB = 0x00; delay_ms(500); } return 0; }
  123. 123. Arduino • C/C++ • •
  124. 124. Arduino PC • – – USB – Ethernet • – Bluetooth – IEEE 802.15.4 / ZigBee
  125. 125. Firmata http://firmata.org/ • Hans-Christoph Steiner • MIDI • Arduino 0012
  126. 126. Firmata PC • Pd (aka Pure Data) • Processing • Funnel • Linux C++ • C++/openFrameworks
  127. 127. 10G IEEE 802.11n 100M IEEE 802.11a/g 10M IEEE 802.11b Bluetooth 1M ANT 100k ZigBee/IEEE 802.15.4 10k 1k 0.1m 1m 10m 100m 1km BAN PAN LAN MAN
  128. 128. Wi-Fi Bluetooth 802.15.4/ZigBee IEEE 802.11a/b/g/n 802.15.1 802.15.4 2.4GHz/5GHz 2.4GHz 866MHz/915MHz/2.4GHz 100m 100m 100m 2.4GHz 300Mbps 3Mbps 250kbps 2.4GHz 32 7 65535 LAN 1
  129. 129. IEEE 802.15.4 • 1 •
  130. 130. IEEE 802.15.4 Star Point to Point Point to Multi 802.15.4 Coordinator 802.15.4 End Device
  131. 131. ZigBee • 1 • •
  132. 132. ZigBee Mesh Coordinator Router End Device
  133. 133. XBee • IEEE 802.15.4 ZigBee 2 *5 – XBee 802.15.4 – XBee ZB ZigBee PRO • 3500 • • *5
  134. 134. XBee • 5V • UDP • 100kbps
  135. 135. XBee XBee • hardware/fio/tool/XBeeConfigTool • • PAN ID • • MY ID • Configure
  136. 136. FIO • XBee Explorer USB PC • Arduino 15 • Tools Board Arduino Pro/ Pro Mini (8MHz) • Tools Serial Port • Open Examples Digital Blink • Upload to I/O Board
  137. 137. FIO • hardware/fio/firmware/FioStandardFirmata • Upload to I/O Board
  138. 138. FIO • FIO • XBee Explorer USB PC • Funnel Server • FioTest
  139. 139. Funnel 009 • I2 C – – – LED • Funnel Server • XBee FIO •
  140. 140. 2006
  141. 141. • – – 3D – – • •
  142. 142. 2008
  143. 143. http://67.org/ws/ Funnel ActionScript

×