http://67.org/ws/




FIO
•                   10:00 11:30
•   1 12:30 13:30
•   2 13:45 15:00
•                    15:15 16:30
•
• Arduino
•
•
•
1
• Funnel
•
  – LED
  –        CdS
2
•
  –
  –
• Flash CS3/4 Professional
• 60
• wonderfl   fork   OK
•
• http://funnel.cc/Workshops/67WSFioPrimer
FIO                 v1.7       1
                    860mAh     1
                               1
XBee Explorer USB              1
XBee 802.15.4                  2
                    EIC-801    1
                               10
                    KMX-1050   1
CdS                 5mm        1
                    330        2
                    10k        1
LED                            2
USB                            1
•              1993 2004
  –
  –
  –
• IAMAS 2004
  –
  –
GAINER
GainerBook Labo   2007   2008
Making Things Talk
Arduino
Tom Igoe             2008
Make           Volume 05-08
   Prototyping Lab
                              2008-9
ActionScript 3.0
It’s a wonderfl world
                              2009
Prototyping Lab
                  2010
•                          ITP*1    Tom Igoe

•
             1
•

•                               1


    *1   Interactive Telecommunications Program
•

•
    LED
•
          I/O   PC
1 Mountain Guitar
•
•
    –
    –
•            I/O            PC
• IAMAS
•    CG
1 Mountain Guitar
1 Mountain Guitar 1
1 Mountain Guitar 2
1 Mountain Guitar 2
1 Mountain Guitar 3
1 Mountain Guitar 4
1 Mountain Guitar 4
1 Mountain Guitar 4
1 Mountain Guitar 5
1 Mountain Guitar 5
2 Jamming Gear
•       ×
•
    –
    –
•            ×FIO×Max/MSP×PC
• Ars Electronica 2009 Digital Music
  Honorary Mention
•
•
•
•
•
•
•
•
•



            littleBits coffemaker*2


    *2   http://www.vimeo.com/1389390
•
    –
    –
•
    –
    –
PC
•        ASCII
•         1

    PC           bps
Alto (1973)




              http://toastytech.com/guis/
•
    ActionScript C C++ Java
•

•
•
•
•
    – Flash
    – Processing
    – Max/MSP
•
    – Gainer
    – Arduino
    – Phidgets
Arduino Wiring PIC
  program
                  A
  a0]=ain.o;
  aout.1 = 255;


                  B



                  C



                  D
PC   Arduino Wiring
       program
                                   A
       a0]=ain.o;
       aout.1 = 255;


                                   B



                                   C



                                   D




       PC

                   program

                   a0]=ain.o;
                   aout.1 = 255;
Arduino




          SparkFun Electronics
I/O   PC        Gainer Phidgets
                                A



                                B



                                C



                                D




           PC

                program

                a0]=ain.o;
                aout.1 = 255;
Gainer I/O
•
    – 2
    –     GND
    –     V
•
    –
    –   A
•
    –
    –   Ω
• 1,000        1kΩ
• 1,000,000          1MΩ
• 1,000
    1
              1mA
• 1,000,000
      1
                     50µA
•
•
+5V   GND
LED
•
•
    –
    –
    –
•
•
•
LED
LED


• LED
        20mA
•
•
•
V =I ×R

• V    V
• I   A
• R    Ω
− LED         = LED            ×R

R

                   − LED
      R=
            LED

    5.0V LED        1.8V    10mA

         5 − 1.8    3.2
      R=         =      =
           0.01    0.01
LED
•   +5V
•   GND
•
LED   NG
LED
LED

      7
physical × wonderfl


•
•
wonderfl
http://wonderfl.net
•
•                    Flash
  –
  –                  fork
• 2008    12          9,000
           28,000             AS3
           2009 8
physical × wonderfl
http://physical.wonderfl.net
• IAMAS
• wonderfl

  –                           Funnel
  –
  –                               GUI
• 2009   7   24
• wonderfl
 –
 –
• IAMAS wxp
 –
 –          hoonida-kim
 –
physical × wonderfl
•
•
•
•
•
•
•
•
•

•
Funnel
•
    –               Convolution
    –                       SetPoint
    –           Scaler
    –          Osc
•        I/O
Funnel
Gainer

                             1

var   lastState = -1; //
var   t = 127; //
var   h = 20; //
var   gio = new Gainer();

function loop():void {
    var state = lastState;
    var val = gio.analogInput[0]; //           0
    if (val < (t - h)) //
        state = 0; //      0
    else if (val > (t + h)) //
        state = 1; //      1
    if (lastState == 0 && state == 1) //   0       1
        sound.start(); //
    lastState = state; //
}
Funnel

                           2

var gio = new Gainer();

//
gio.addFilter(new SetPoint(0.5, 0.1));

//
gio.addEventListener(RISING_EDGE, onButtonPress);

//
function onButtonPress(e:Event):void {
    sound.start(); //
}
UI
•
•
•
• LED
•       LED
•             H
UI

                          3         LED

var gio:Gainer = new Gainer();

//
gio.button.addEventListener(PRESS, function(e:Event):void {
    gio.led.blink(200, 1); // LED 200ms      1
});

//
gio.button.addEventListener(LONG_PRESS, function(e:Event):void {
    gio.led.blink(200, 3); // LED 200ms      3
});
FIO (Funnel I/O)

• LilyPad Arduino v1.6
•
• XBee
FIO (Funnel I/O) v1.3
FIO (Funnel I/O) v1.3

                        -   +
Arduino
• Hernando Barrag´n
                 a            IDII*3
        Wiring
•

• IDE      Arduino I/O




  *3   Interaction Design Institute Ivrea
Wiring




         SparkFun Electronics
Arduino Duemilanove




                SparkFun Electronics
Arduino IDE
•
    –
    –
•
LilyPad Arduino




                  SparkFun Electronics
Arduino Pro Mini




                   SparkFun Electronics
Arduino ProtoShield




                 SparkFun Electronics
Arduino XBee Shield




                SparkFun Electronics
Arduino
          GND




                +5V GND
Gainer I/O    Arduino

               Gainer I/O   Arduino Duemilanove
               16           20
        A/D    8 8bit       6 10bit
       PWM     8 8bit       6 8bit
               1            0
        LED    1            1 D13
               Yes          Yes
               No           Yes
Arduino
•
•
•
•
Arduino                LED

                                4 Arduino   LED

int ledPin = 13;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(1000);
}
C                  LED

                            5       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;
}
C           LED

                             6   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;
}
Arduino
• C/C++
•
•
Arduino     PC
•
    –
    – USB
    – Ethernet
•
    – Bluetooth
    – IEEE 802.15.4 / ZigBee
Firmata
http://firmata.org/

• Hans-Christoph Steiner
• MIDI
• Arduino 0012
Firmata          PC
•   Pd (aka Pure Data)
•   Processing
•   Funnel
•   Linux C++
•   C++/openFrameworks
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
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
IEEE 802.15.4
•               1
•
IEEE 802.15.4

  Point to Point      Star




  Point to Multi




                   802.15.4 Coordinator
                   802.15.4 End Device
ZigBee
•        1
•
•
ZigBee




         Mesh
           Coordinator
           Router
           End Device
XBee
• IEEE 802.15.4 ZigBee 2          *4

  – XBee 802.15.4
  – XBee ZB ZigBee PRO
•                          3500
•
•



  *4
XBee
•           5V
• UDP

•
       100kbps
XBee
               XBee
• hardware/fio/tool/XBeeConfigTool
•
• PAN ID
•
•                      MY ID
• Configure
FIO
• XBee Explorer USB PC
• Arduino 17
• Tools Board       Arduino Pro/ Pro Mini
  (8MHz) w/ ATmega168
• Tools Serial Port
• Open Examples Digital Blink
• Upload to I/O Board
FIO
• hardware/fio/firmware/FioStandardFirmata

• Upload to I/O Board
FIO
• FIO
• XBee Explorer USB   PC
• Funnel Server
•
FIO   LED
FIO
FIO
g•sinø       g•sinø
         ø            ø

         g            g
• 60
• wonderfl   fork   OK
•
http://67.org/ws/




FIO

67WS Event FIO Primer