Major Studio: Interactive

Welcome to my Major Studio: Interactive class page. Most of my work, for now, will appear on the blog. All the work I do in the class will appear there, so keep an eye open for the torrent of new stuff that will appear week after week.

Haptics Research

My group in studio was assigned to investigate touch interfaces by digging into vibrating motors, timed stimulus, and other odd bits of perception. The results of our work are detailed here.

First Prototypes

For our initial assignment, we were tasked to build devices that communicated to the users via their sense of touch.

Arduino Coding Session

Today, we will run through the basics of Arduino programming. To follow along, please go to the reference section of the Arduino site and step through the functions as we go.

Also, download the files below. They are the Arduino code examples we'll follow once we start making real circuits.

AttachmentSize
knight_rider_1.zip471 bytes
knight_rider_2.zip39.57 KB
vibrapot.zip37.68 KB

Intro

  • Voltage and Logic
  • Digital "Voltage"
    • LOW is 0V
    • HIGH is 5V
  • Analog "Voltage"
    • Voltage in 1024 divisions between 0 and 5V

Data Types

  • numbers
    • byte 0 - 255
      • space saving! use this when possible!
    • int
      • handy for negative numbers and most other uses bigger than a byte
      • -32,768 to 32,767
    • long
      • -2,147,483,648 to 2,147,483,647
      • Four times bigger than a byte
      • Do you REALLY need numbers this size? Only use this when necessary
  • char
    • also a byte
    • but you can use ASCII characters instead of numbers
    • google for "ASCII table" to see what number is what character
    • Handy to know for sensors and other stuff that uses serial. Bytes = chars.
  • arrays
    • an array is a kind of list of other data types
    • can be any data type
    • can be set to be whatever size you need
    • arrays are numbered starting from 0
    • Let's play with this

Control structures

  • if/else
    • simple branching
  • switch case
    • more complicate branching
    • for multiple cases
    • like if the input is 1, go to first base, 2 go to second base, 3 go to third, 4 home run, default strike out
    • after each case, be sure to add break; otherwise, it'll keep on going
  • for loop
    • good for loop a set number of times
    • like looping through all the pins
  • while
    • good for loop an unknown number of times
    • maybe for forever
    • maybe until something happens to break out

Tutorial 1: Data and Serial

Arduino Hooked UpArduino Hooked UpNow we'll run the knight_rider_1 tutorial. Open up the files in the zip archive. All you need for this is to plug in the Arduino to your computer.

Once the board is plugged in, hit reset on the board, then click the Upload to I/O icon on the Arduino interface. Once that's done, click the Serial Monitor icon to see the numbers move up and down. Now you're talking (to the Arduino!)

Digital Read/Write

  • pinMode
    • takes the pin to be determined
    • takes the mode -> in or out
    • MUST do this for most pins. Forgetting this will get you in trouble
  • digitalWrite
    • takes pin and sets it HIGH or LOW
    • that is, gives that pin 0 or 5V
  • digitalRead
    • takes pin and returns HIGH or LOW

Other Cool Stuff

  • Math
    • max, min, contrain, randomSeed, random
  • Time
    • delay
      • important for adding pauses
      • otherwise things will run crazy fast

Tutorial 2: Digital Read and Write

Knight LightsKnight LightsNow let's put some of this stuff together into a new circuit. You'll need four LEDs, four 220 ohm or 470 ohm resistors, one 1K ohm resistor, a push button, and a bunch of wires.

Hook four wires into the Arduino's digital outputs (check the code to see which ones.) Connect the smaller resistors to each of those wires, then connect an LED to each resistor with its short leg to ground. Be sure to hook up the 5V and GND lines between your Arduino and breadboard.

Connect the 1K resistor to ground (this is a pull down) and to one pole of the switch. Hook that same pole to the input on the arduino. Hook the other pole to the 5V source.

You're all set!

Analog Read/Write

  • Analog pins don't require pinMode -- they are fixed
  • analog read pins are on a separate set up pins
  • analogue write pins (PWM pins) are on 9, 10, and 11
  • analogWrite takes a pin and a value (but the value must be between 0 and 255)
  • analogRead takes a pin (must be numbered from the analog pins) and returns a value 0 - 1023
    • This is four times larger than analogWrite
    • The number corresponds with the voltage
      • 0 is 0V
      • 1023 is 5V
    • You can test your sensors and see what voltage that give off with a multimeter, then build your circuit around that
    • or check the output from serial and calibrate your application that way

Tutorial 3: Fun With Pot and Vibrators

Buzzy BasicsBuzzy BasicsOkay, actually, that's a pot as in potentiometer. Nyuk, nyuk. Anyway, let have some fun here!

  • Connect pot to analog in pin
  • Connect vibrator to PWM out pin
  • Get the input for the analog in
  • Scale the input
    • Huh?
    • Scaling adjusts the input values of 0 - 1024 to a different range that we can use
    • In this case, we want the output to be from 0 to 127
  • write the output to the PWM pin
  • buzzzZZZZZzzzzZZZZZzzz!

Advanced Stuff

  • shiftOut
    • turns numbers into streams of data
    • handy for working with other chips
    • especially simple ones that don't take serial
  • pulseIn
    • Can measure pulses sent in by simple devices and chips
    • helpful for timing

Class Notes

Notes from the Major Studio: Interactive class.

2007-01-22

  • link
    • studio objectives
    • schedule
    • grading
      • 40 % part
      • 60% projects/final
  • we're doing...
    • online sharing
      • online socially-driven media sharing
      • how networks exists
      • how they speak to each other
      • how do the audience and creators realte to each other in this experience
    • toy design
  • schedule
    • after midterms, you're on your own
    • small projects with web, etc.
    • subject to change
    • 5 to 10 page paper at the end
  • readings
    • Code by Charles Petzold
  • blogs
    • searching
      • technorati
      • why specific searching
        • immediacy
        • get around the backlog of old cached material
      • others
    • tagging
      • metadata in blog post
    • comments
      • not just the views it has, but also the comments
  • youtube
    • boring?
    • sad?
    • new communities
    • blurring the lines between tv, flim, internet video, etc.
  • documentation
    • document everything!
  • arduino
  • homework
    • reading

2007-01-25

  • Content
    • Creation
      • a few shows have huge viewship, but it's a long tail
      • people, all people, are able to express themselves
      • now you can put yourself in the encyclopedia
    • Distribution
      • you can go get it at any time
    • Filter
      • Editorial Voice
      • Critical Voice
      • Blogs
        • Top Blogs
          • Political
            • DailyKos
            • Wonkette
            • Huffington Post
            • Andrew Sullivan
            • Early Movers have leverage
              • Like Sullivan
          • Technical
            • Slashdot
            • GizModo
            • Scripting News
          • Art
            • Interactive Architecture
            • We Make Money Not Art
            • Cool Hunting
              • small but influential
            • Psychogeography
          • Fashion
            • Daily Candy
          • DIY
            • Make Blog
          • Gossip & Media
            • TMZ
            • Gawker
            • ain't it cool news
          • Food
            • Cooking
            • Dining
              • chow hound
        • Blogsphere
      • General/Filters
        • digg
        • Boing Boing
          • The big one
        • del.icio.us
      • Search Engines
      • Filter for the whole world
      • Global Voices Online
      • Main Stream Media
        • AP
        • Other news feeds
      • Music
        • Pandora
        • last.fm
      • Portals
        • Yahoo
        • MSN
        • AOL
      • Forums
  • Viewer behavior
    • internet
      • solitary
        • or is it?
      • interactive
    • TV
      • more social
        • or is it?
      • less interactive
  • Video Sharing
    • YouTube
    • Others
      • Guba
      • Grouper
      • Dailymotion
      • Bolt
      • video.yahoo.com
      • video.google.com
      • metacafe
      • magnify.net
      • photobucket
      • revver
      • veoh
      • vidilife
      • ourmedia
    • art id always mediated by the medium
    • lonelygirl15
  • Homework
    • Blog
      • BlogRoll
        • Include yer classmates
        • Inter-linking is important for ranking
        • Make drupal module
      • Change Banner
      • Add Stats
        • post which module you're using
        • e.g. Google Analytics
    • YouTube account
      • 5 favs
      • 5 subscriptions
      • 1 post
      • Embed post on blog
      • And embed a favorite
  • Toyfair
    • Cady Bartholemew
    • Feb. 10-14
    • Email Yury about this
      • be sure to add [majorstudio2] in brackets

2007-01-29

  • MySpace
    • The Essence of MySpace
      • Can it pay off?
      • Not making it feel like a big company
  • MTV
    • My Super Sweet 16
    • Potlatch
    • Urge
      • iTunes-like
  • Casts
    • Broadcast
      • Medium
        • Airwave
        • Cable
      • Cultural Products
        • Very wide reach
        • Give cultural cohesion
    • "Narrowcast"
      • Medium
        • Cell phones
          • small content
          • thin pipe
      • Cultural Products
        • niche
        • specific
        • Internet
        • Personal
    • Podcast
      • Medium
        • Internet
        • Player
      • Cultural Products
        • Radio/TV
        • DIY
        • Mix Tapes
        • REcipes
        • MEdia Commentary
        • AV Blogs
        • Citizen Journalism
        • Conferences
        • Classes
        • Anything that doesn't get past the b-cast door
  • Blockbusters
    • How to manage so many kinds of content?
    • Especially physical stuff
    • Power Law curve
      • Lots of things with few views
      • a few big hits
    • Celebrity
      • Will there still be celebrities?
  • Homework
    • Read Chap. 1 - 5
    • Bring Arduino
    • Etsy Party Thursday

2007-02-15

  • Wii
    • Handful of the best little components
    • Console Game: A Short History
      • Games are social
        • Especailly console games
        • first console was you against a second player
        • because of its contrl scheme
        • Games are a space to play in
      • 1st Gen
        • Magnavox Odyssey 1972
          • all games pre-programmed
          • jumpers activated the built in games
          • color overlays on top of the screen
          • not popular
        • Pong 1975
          • analog paddle
      • Early engines of innovation
      • 2nd Gen: The Cartridge
        • Atari 2600 1977
          • weakest
          • yet most successful
        • Intellivision 1980
          • 16 bit
        • ColecoVision 1982
      • Crash of 1983
        • very crowded console market
        • bad decisions on next gen consoles
        • Commodore 64
          • stole the show
          • cost about as much as a console
          • guilt tripping parents into buying them instead
        • Bad Games!
          • Pac-Man
          • Custer's Last Stand
          • E.T.
            • made 4 million
            • sold 1.5 million
            • buried the remained under cement in New Mexico
        • Lots of reverse Engineering
      • 3rd Gen: After the Crash
        • Famicom (NES) 1985
          • had to call it an entertainment system
          • not a video game system, after the crash
        • Sega Master System 1985
        • TurboGrafx-16 1989
      • What's the Magic Number: 16 bit era
        • Systems
          • SNES
          • Sega Genesis
          • Neo-Geo
        • Starting to be more like Hollywood
          • profit margins shrunk
        • PCs started competing in the video game market
      • 2 1/2 Console Theory
        • 4G
          • SNES
          • Genesis
          • SNK NeoGeo
        • 5G
          • Sony Playstation
          • Sega Saturn
          • Nintendo N64
        • 6G
          • Sony Playstation 2
          • Xbox
          • Nintendo Gamecube
        • 7G
          • Wii
          • Xbox 360
          • PS3
      • Evolution vs. Revolution
        • Only 2x powerful as GameCube
        • Only 2x RAM
        • Expanding the market rather than competing in the same space
    • The Wii Remote
      • Should look like other remotes
      • blends with what you know
      • feel available
      • affordance
      • multiple approaches to it
      • Communication
        • Bluetooth Radio to console (30ft)
      • Sensing
        • IR positioning system
        • LED bar
        • could use candles instead
        • Orientation on the 2D plane
        • Accelerometer
          • Can't fix itself in 3D space
          • not positional, just gestural
      • Nunchuk
        • Also has accelerometer
        • and an analog thumbstick
      • Limits
        • Must be trained
        • programmer must imitate the move
        • Tutorials adapt to what the user is doing
        • even games have a training phase
        • try to stay within the mean
        • If they get close
          • then they store that gesture
          • different for every player
      • Components
        • Bluetooth Boarcom BCM2042
        • 11 inputs
        • Analog Devices ADXL330
        • IR camera (monochrome 1Mpixel)
        • speaker
        • rumble
        • power button
          • disconnects BT and powers down
        • Player LEDs
      • Gestural
    • XWand
      • visible LEDs
      • IR Led
      • Magnetometer
        • feels the earth's pull
      • PIC micro
      • accelerometer
      • gyro
      • button
      • RF transceiver
      • 4 AAAs
      • 1.5" diameter
    • Class Project
      • Darts?!
        • Could be VERY cool
        • Similarly, making/throwing a paper airplane
      • Marble Madness
      • Put multiple people in the same place
    • Suspension of disbelief
      • Believing the you're controlling it
    • Space is MORE important
      • it's not always going to go more and more for the Net all time
      • pendulum swing
      • overloading on different design paradigms
  • Class Blog
  • Prototyping
    • How you sell a concept
    • Rapid Prototyping
      • only so many hours in a day
    • Iterative Design
      • 3 time iteration
      • but some things are iterated indefinitely
      • not just one person iterating
        • could be an entire culture iterating a genre
        • iterating techniques, media forms, etc.
    • Midterm Wii Project
      • IR camera
        • Computer vision
        • tracking
        • Can we even do this?
      • Accelerometer
        • acceleration on 3-axis
        • motion
        • change in speed
        • gestures
        • communication
        • must decodify the forces back into gestures
        • Serial Read
          • do the gestures
          • look at the data feed
      • Bluetooth
        • Calbe replacement
        • Wireless connection
      • Vibrating Motors/Tactile Feedback
        • Use at least two
        • More fidelity
        • replaces sound
        • replaces another modality
          • helpful because it's not disruptive
          • works in areas when other modalities don't work
        • alerts you to someone trying to contact you
          • tap!
          • look at me
          • no message in itself
        • the white rabbit effect
          • filling in the gaps in sensation
          • timing just right
        • haptics
          • joysticks
          • buttons
          • most modern media forms start off with adult entertainment
            • in fact, this might be the touchstone of a potential mass medium
            • photos, videos, Net
        • tactics
          • virtual thing coming at you
          • effecting environment
      • Screen
        • iPod is only as good as the songs you have on it
        • Getting the Arduino into the computer
          • processing
            • push toward this
          • max/msp
          • director
        • 4-5 button switch
        • interactive eye candy
      • Then we combine each into three groups
      • Communication
        • Network of blogs?
        • Wiki?
        • E-mail list?
      • Presentation
  • Assignment
    • Quiz 6-11
    • Focus on 8 and 9
    • Bluetooth
      • Compile resources
      • make parts list
      • possible example code
      • examples of use (youtube video)
      • game examples