Paja

Icon

Rapid prototyping for music, art and design work

Course materials for Designing Interactions course 2010 at Media Lab Helsinki

Intensive workshop for Designing interactions course

Date: Steptember 6 – September 10, 2010

Location: Media lab Helsinki in Helsinki, Finland

Course materials:

Monday

Introduction: 09:00 – 09:30

Assembling electronics: 09.30-10.30PDF, Final demos from previous years

  1. Basic tools: you need following equipments to run example codes.
    1. Arduino board (microcontroller)
    2. USB Type A-B
    3. Breadboard
    4. Jumper wires
    5. Multimeter
  2. Understanding schematics
    1. Flow of positive charge
    2. Most popular components
    3. Markings in resistor (Resistulator dashboard widget)
    4. Markings in capacitor
  3. Checking your circuit
    1. Measuring voltage, resistance and conductivity

Setting up Arduino environment: 10.30 – 11.00

Download Arduino Software from Arduino Download page

    1. Install USB driver. The install image is in the downloaded Arduino folder
    2. Select following setting when you run Arduino software first time.
    3. Tools > Board > Arduino Duemilanove or Nano w/ ATmega328
    4. Mac: Serial Port > /dev/cu.usbserial-xxxxxxxx

Required libraries during the course (How to install libraries)

Run example code

    1. File > Examples > Digital > BlinkWithoutDelay
    2. File > Up load to I/O Board
    3. LED by digital pin 13 will start blinking. If not, you will received some error in red text.

Programming microcontrollers: 12:00 – 16:00

Basics

  1. Exercise: Hello world – Arduino code
  2. Exercise: Introduction (Flashing LED) – Arduino code
  3. Exercise: Sending data to your PC (Serial.print, println) – Arduino code
  4. Exercise: Understanding ASCII (American Standard Code for Information Interchange) – Arduino code
  5. Demo: Type of Numbers (Binary, Hexadecimal, Decimal, Signed Decimal) – Arduino code

Architecture

  1. Demo: Variables type definitions – Arduino code
  2. Exercise: Arrays/Strings – Arduino code
  3. Exercise: Operators (+, -, *, /, %) – Arduino code

Controls

  1. Exercise: Functions – Arduino code
  2. Exercise: Looping structure (For statement) – Arduino code
  3. Exercise: Branching (If statement) – Arduino code
  4. Demo: Branching (Switch statement) – Arduino code
  5. Exercise: Data controls (ramdom) – Arduino code

Tuesday

IO Commands: 09.00-12.00, 13:00 – 14:00

  1. Digital IO (digitalWrite)
    1. Exercise: Flashing LED – Schematic, Arduino code
  2. Digital IO (digitalRead)
    1. Exercise: Tilt switch – Schematic, Arduino code
  3. Digital IO (pulseIn)
    1. Exercise: Memsic 2125 Accelerometer: Measuring tilt and motion – Schematic, Arduino code
    2. Exercise: Ping))) Ultrasonic Sensor: Measuring distance – Schematic, Arduino code
  4. Analog IO (analogWrite using PWM pins)
    1. Exercise: Dimming LED – Schematic, Arduino code
  5. Analog IO (analogRead)
    1. Exercise: Photoresistor: Measuring ambient light – Schematic, Arduino code
    2. Exercise: Flexiforce Sensor Demo Kit: Measuring pressure – Schematic, Arduino code
    3. Exercise: Piezo speaker: Detecting vibrations – Schematic, Arduino code
  6. Extend capability using libraries (#include)
    1. Exercise: Servo motor Schematic, Arduino code
    2. Excercise: Motor shield to control Stepper motor – Schematic, Arduino code
  7. Communicating to PC over Bluetooth
    1. BlueSMiRF Gold Bluetooth module Instructions to configure the module
    2. Install Messenger library – Instructions
    3. Excercise: Dimming LED and measuring proximity (to be used also on Friday) – Schematic, Arduino code
    4. Pair the BlueSMiRF Gold bluetooth module
      1. Pair the Bluetooth module with your Mac
      2. Select status bar
      3. Select “Bluetooth”
      4. Select “Devices” and select “New”
      5. The dialog should show the name started by “FireFly-****” (*shows last 4 digit of the physical address)
      6. Select the BlueSMiRF Gold
      7. Type “1234” in the Passcode
      8. Select “Pair”
      9. “FireFly-****” appears in the list when successful
    5. Communicate to Arduino using Zterm (terminal emulation program for Mac)
      1. Open Zterm
      2. Settings > Modem preferences…
      3. Choose FireFly-****
      4. zterm_modem
      5. Edit > Keyboard Buffer
      6. Type “r a d 7” and press return in the keyboard buffer window. Local window will show value received from the proximity sensor.
      7. Type “w a 9 <number>”. <number> will have integer betwen 0 and 255. Pressing return will light up LED.

Other sensors and actuators 15:00 – 16:00

Shops: Sparkfun (USA), Parallax (USA), I-Cube (USA), Partco (Finland), Paeae (Finland), Robomaa (Finland) and so on.

Following post collects links to application demos. All demo doesn’t implemented by Arduino.
http://mlab.taik.fi/paja/?cat=39

To be added

  1. Gyro
  2. Compass

Wednesday and Thursday

Adobe Flash workshop by Nuno Correia

All course materials are available on his course blog.

Friday

Running Flash files on Nokia N900

  1. Setup Arduino and bluetooth
    1. Dimming LED and measuring proximity – Schematic, Arduino code
  2. Setup environment on N900
    1. Install Personal IP address homescreen widget
      1.    Open App manager > Download > All
      2.    Type “Personal IP…” and install it.
    2. Install PhysicalN900 application from Yunta’s site (http://yunta.dainet.pl/repos_and_fizikal.install). Please open this site with N900.
      1. App manager opens and start installing it. Please accept if the installation asks any question.
      2. Restart N900
    3. Insert valid SIM card to enable AGPS otherwise positioning from GPS will take for many minutes
    4. Open SWF for bluetooth connection and SWF for the rest directly from N900 Browser
    5. Download Flash source code v1.0
    6. Content (copy only swf files to N900)
      1. PhysicalN900_test.swf
      2. PhysicalN900_test.fla
      3. PhysicalN900_btTest.swf
      4. PhysicalN900_btTest.fla
      5. PhysicalN900.as
      6. bt_communication.pde (Arduino file)
      7. bt_communication.pdf (Shematic)
      8. echoing_arduino.pde (Arduino file for testing)
  3. Run PhysicalN900 servers
    1. Open application grid
    2. Open PhysicalN900 application
    3. Start servers
      1. acceleration returns three values in milliG. 1000mG = 1G
      1. ambient_light returns one value in lux. See wikipedia for lux.
      2. echo returns the same value that is sent from swf file
      3. position returns a lot of interesting values. See the table of LocationGPSDeviceFix in Maemo wiki for details
      4. vibration accepts one integer in string between 0 and 255.
  4. Run swf file

    1. Open file manager
    2. Open the SWF file that is copied from PC
    3. Browser will open it
    4. Check correspoinding server is already started.
  5. Connect to Arduino over Bluetooth
    1. Plug an external 9V AC-DC adapter to Arduino
    2. Open PhysicalN900 application
    3. Start bluetooth_serial
    4. Open PhysicalN900_btTest.swf from File manager
    5. Type physical address of the bluetooth module in the swf file
    6. Type command (e.g. “r a d 7” (read analog value from digital pin 7) and “w a 9 200” (write analog value 200 to pin 9)
  6. Access servers on N900 from your PC
    1. Open PhysicalN900_test.swf on your PC
    2. Open PhysicalN900 application on N900
    3. Find IP address of N900 shown in Personal IP address widget on homescreen
    4. Test to access server applications mentioned above.

Examaple demos created by Nuno Correia

  1. Nokia N900 and Flash examples

Assignment 1

  1. PDF
  2. Create a simple interactive system using Arduino, Flash and N900
  3. Fritzing is a PCB CAD tool for Aduiino. You can use this tool to create your schematics.

Returning compoenents to Media lab

Facebook Twitter Email

Category: Course materials

Tagged:

4 Responses

  1. […] is some examples that students worked on during the intensive workshop. Nuno Correia also created some example demo during his lecture in the […]

  2. […] interactivity with the Nokia N900 and Flash. Course information and materials available here: http://mlab.taik.fi/paja/?p=1249 More information on the course: http://mlab.taik.fi/mediacode/c/courses-projects/diwe2010 Examples […]

  3. […] interactivity with the Nokia N900 and Flash. Course information and materials available here: http://mlab.taik.fi/paja/?p=1249 More information on the course: http://mlab.taik.fi/mediacode/c/courses-projects/diwe2010 Examples […]

Social links powered by Ecreative Internet Marketing