Asad J. Malik PC

From BenningtonWiki
Jump to: navigation, search

Physical Computing Spring 16 > Asad J. Malik PC

Contents

Session № 1: February 24

First Class - Introduction to the Art of Physical Computing

Session № 2: March 2

Written Response to “The Art of Interactive Design” by Chris Crawford

Original Reading available online here : http://itp.nyu.edu/~ym349/pc/theartofinteractivedesign.pdf

Just like most educational books, “The Art of Interactive Design” starts off by acknowledging the frequent misuse of the topic under consideration; interactivity. The author, Chris Crawford, then spends the first chapter defining what ‘interactivity’ means to him. He, very rightly, clarifies the fact that his definition will not be the “best” definition possible but hopes that it will at least be helpful in terms of designing interactive experiences.

He uses the metaphor of conversation to define interactivity. This is indeed a helpful way of thinking about it and I’m sure breaking down the process of designing an interactive experience to listening, thinking and speaking would make things easier. However, this definition demands a bit too much and disregards how the word is frequently used in different contexts. For example, while looking for “an interactive fine art project” for this week’s class assignment, I realised that the majority of art categorised as “interactive” fails to fit into his definition. There also seems to be a difference between “overall interactivity” and “an interaction”. For example, a user might interact with a button on an interface by pushing it. As a designer it’s my job to design the interaction and make it as rewarding and efficient as possible. It helps to think of it as “an interaction”. Does having a button on an interface make it “overall interactive”? No. This difference can also be illustrated with Crawford’s own example of the non interactive book. The book as a medium is not interactive. The content is already laid out and you cannot interact with the author. But this does not mean that the process of you turning the page of the book cannot be looked at as an interaction with the page. It doesn't make the book overall interactive but looking at the process of turning the page as an interaction can be helpful for the designer as she can then improve this particular interaction.

Interactive Fine Art Project: night lights

View: https://vimeo.com/8525186

As I wrote earlier, finding a fine art project that can be defined as interactive (under Mr Crawford’s definition) was trickier than expected. I chose this project simply titled as “night lights” because it is certainly overall interactive. Visual mapping on buildings is not very new but I always find it fascinating. Allowing the audience to interact with it definitely takes it a step further. This particular piece is very well executed because it reads the figures of the spectators/performers and seamlessly blends them into the animation being projected instead of just projecting their blown up shadows on top of it.

Session № 3: March 9

Arduino Labs

Example 01: Blinking LED

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

void loop() {
  digitalWrite(13, HIGH);  
  delay(2000);          
  digitalWrite(13, LOW);  
  delay(2000);        
}

See the example come to life: http://vsco.co/asadjmalik/media/56ea4231ac7c9d2d60b1abbc

LED Light On

Example 02: Turn on LED while the button is pressed

const int LED = 13; 
const int BUTTON = 7;  
int val = 0; 

void setup() {
    pinMode(LED, OUTPUT); 
pinMode(BUTTON, INPUT);
}

void loop() {
    val = digitalRead(BUTTON);

    if (val == HIGH) {

       digitalWrite(LED, HIGH);
    } else {

      digitalWrite(LED, LOW);
    }
}

See the example come to life: http://vsco.co/asadjmalik/media/56ea44dcac7c9d2d60b1abbd

  • LED Light Off - Button Unpressed
  • LED Light On - Button Pressed


Example 03A: Turn on LED while the button is pressed and keep it on after press


const int LED = 13;
const int BUTTON = 7; 

int val = 0;        
int old_val = 0;     
int state = 0;       
void setup() {
  pinMode(LED, OUTPUT);  
  pinMode(BUTTON, INPUT); 

}

void loop() {
  val = digitalRead(BUTTON); 

  if ((val == HIGH) && (old_val == LOW)) {
    state = 1 - state;
  }

  old_val = val;

  if (state == 1) {
    digitalWrite(LED, LOW); 
  } else {
    digitalWrite(LED, HIGH); 
  }
}

See the example come to life: http://vsco.co/asadjmalik/media/56ea47b8ac7c9d2d60b1abbe

Session № 4: March 16

Written Response to “The Design of Everyday Things” by Don Norman

Original Reading available online here : http://cc.droolcup.com/wp-content/uploads/2015/07/The-Design-of-Everyday-Things-Revised-and-Expanded-Edition.pdf

Don Norman is basically the god father of modern user centred design. IDEO's HCD-kit has become such a frequent reference point in the design industry and so much of my recent work (FWT) has revolved around Human Centred Design. I was working with Libya's top designer on setting up, what is possibly, the first Human Centred Design academy in the world. The fact that mainly the idea of the academy was going to serve the purpose of a business incubator but under the banner of HCD goes to show how influential the simple, almost intuitive, idea of focusing on the users emotion and experience is even outside the realm of design. I do think that the tools Norman provides in thinking about HCD and breaking it down to Affordances, Signifiers, Mapping, Feedback and Conceptual Models, are very helpful even for people who're not pursuing design as a career. Every person ends up needing to design a presentation or maybe just a plate of breakfast for their significant other. Having the design thinking mindset is just universally helpful.

I've been very familiar with the content discussed in the reading since it's been repeated in multiple presentations, workshops, online videos, articles that I've read over the years. But to read the original in Norman's own words was certainly a rewarding experience. I plan on learning more about it and spreading it forward. (This is certainly a response and not a summary. I hope I'm doing these how they're intended to be done.)


Arduino Labs

Example 03B: Turn on LED while the button is pressed and keep it on after press. (Improved Formula)

const int LED = 13;   
const int BUTTON = 7; 
                         
int val = 0; 

int old_val = 0; 
                      
int state = 0; 

void setup() {
  pinMode(LED, OUTPUT); 
  pinMode(BUTTON, INPUT);
}
void loop(){
  val = digitalRead(BUTTON); 
                                            
  
  if ((val == HIGH) && (old_val == LOW)){
    state = 1 - state;
  }

  old_val = val; 
 
 if (state == 1) {
    digitalWrite(LED, LOW); // turn LED On 
  } else {
    digitalWrite(LED, HIGH);
  } 
}

Looks the same as this really: http://vsco.co/asadjmalik/media/56ea47b8ac7c9d2d60b1abbe

Example 03C: Turn on LED while the button is pressed and keep it on after press. (Improved Formula w debouncing)

const int LED = 13; 
const int BUTTON = 7; 

int val = 0; 
             
int old_val = 0; 
           
int state = 0; 

void setup() {
  pinMode(LED, OUTPUT);  
  pinMode(BUTTON, INPUT); 
}

void loop(){
  val = digitalRead(BUTTON); 

  
  if ((val == HIGH) && (old_val == LOW)){
    state = 1 - state;
    delay(10); 
}

  old_val = val; 
  
 if (state == 1) {
    digitalWrite(LED, HIGH); 
  } else {
    digitalWrite(LED, LOW);
  } 
}

Looks the same as this really: http://vsco.co/asadjmalik/media/56ea47b8ac7c9d2d60b1abbe

Example 04: Fade an LED in and out

const int LED = 9; // the pin for the LED
int i = 0;          // Use this to count up and down  


void setup() {
  pinMode(LED, OUTPUT); // tell Arduino LED is an output
}


void loop(){
  
  for (i = 0; i < 255; i++) { // loop from 0 to 254 (fade in)
    analogWrite(LED, i);      // set the LED brightness
    delay(10);                // Wait 10ms because analogWrite
                            // is instantaneous and we would
                            // not see any change
}

  for (i = 255; i > 0; i--) { // loop from 255 to 1 (fade out)
    analogWrite(LED, i);      // set the LED brightness
    delay(10);                // Wait 10ms
}

}

See the example come to life: http://vsco.co/asadjmalik/media/56ea52dcac7c9d2d60b1abbf

Example 05: Turn on LED while the button is pressed and keep it on after press. (Improved Formula w debouncing) & when button is pressed more the brightness changes

const int LED = 13; 
const int BUTTON = 7; 
int val = 0; 

int old_val = 0;
int state = 0; 
int brightness = 128;
unsigned long startTime = 0; 

void setup() {
  pinMode(LED, OUTPUT); 
  pinMode(BUTTON, INPUT); 
}

void loop() {
 
   val = digitalRead(BUTTON); 


if ((val == HIGH) && (old_val == LOW)) {

   state = 1 - state; 
   startTime = millis(); 
    
    
    delay(10);
}


if ((val == HIGH) && (old_val == HIGH)) {

  
  if (state == 1 && (millis() - startTime) > 500) {
     
      brightness++; 
     delay(10); 

      if (brightness > 255) { 
  
           brightness = 0; 
      }
   }
}

old_val = val; 
if (state == 1) {
  analogWrite(LED, brightness);
  } else {
     analogWrite(LED, 0); 
  }
}

See the example come to life: http://vsco.co/asadjmalik/media/56ea53deac7c9d2d60b1abc0

Session № 4: March 16

Written Response to “The Bandwidth of Consciousness” by Tor Nørretranders

Putting a number to a concept as broad as "consciousness" is no easy task. However, I greatly enjoyed the text and looked at it as painting the human brain as a relatively complex Arduino board. My only critique would be that the article talks about consciousness only in terms of attention, which of course is a very limited lens to put on. I found some graph to be very useful, specially the one that shows the bits/sec going down the human life span. Certainly something I'd print out to put on my wall.

Arduino Labs

Servo Motor Control with Analogue input


#include <Servo.h>     
 
Servo servoMotor;  
int servoPin = 3;      
 
void setup() {
  Serial.begin(9600);     
  servoMotor.attach(servoPin);  
} 
 
void loop()
{
  int analogValue = analogRead(A0); 
  Serial.println(analogValue);
 
  
  int servoAngle = map(analogValue, 0, 298, 0, 179);

  servoMotor.write(servoAngle);
}

Servo Sweeping Example


#include <Servo.h>

Servo myservo;  

int pos = 0;    

void setup() {
  myservo.attach(9);  
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { 
    
    myservo.write(pos);            
    delay(15);                     
  }
  for (pos = 180; pos >= 0; pos -= 1) {
    myservo.write(pos);             
    delay(15);                       
  }
}


See the example come to life: http://vsco.co/asadjmalik/media/56f2377f719f193837a3507d


Session № 7: April 6

Arduino Labs

Serial Output from an Arduino to Processing

Potentiometer hooked up to feed data into processing

Arduino Code


/// Step 1
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  int analogValue = analogRead(A0)/4; // read sensor value
  Serial.write(analogValue); // send value serially as binary value
}

Processing Code


import processing.serial.*;

Serial myPort; // The serial port
float xPos = 0; //horizontal position of graph

void setup () {
  size(800, 600);        // window size
    println(Serial.list());
        
  String portName = Serial.list()[5];
  myPort = new Serial(this, portName, 9600);
  background(#3e3e3e);
}
void draw () {
  // nothing happens in draw. All happens in SerialEvent()
}

void serialEvent (Serial myPort) {
  // get the byte:
  int inByte = myPort.read(); 
  // print it:
  println(inByte);
  float yPos = height - inByte;
 // draw the line in a pretty color:
 stroke(#AAC4FF);
 line(xPos, height, xPos, height - inByte);
 // at the edge of the screen, go back to the beginning:
   if (xPos >= width) {
     xPos = 0;
     // clear the screen by resetting the background:
     background(#000); 
   } else {
      // increment the horizontal position for the next reading:
      xPos++;
    }
}

Session № 8: April 20

Arduino Labs

Using a Transistor to load high current Loads

Arduino Code

 
const int transistorPin = 9;
 
 void setup() {

   pinMode(transistorPin, OUTPUT);
 }
 
 void loop() {

   int sensorValue = analogRead(A0);


   // use that to control the transistor:
   analogWrite(transistorPin, outputValue);
 }

DC Motor Control Using an H-Bridge

Arduino Code

 const int switchPin = 2;
const int motor1Pin = 3; 
const int motor2Pin = 4; 
const int enablePin = 9; // 

void setup() {

    pinMode(switchPin, INPUT); 
 

    pinMode(motor1Pin, OUTPUT);
    pinMode(motor2Pin, OUTPUT);
    pinMode(enablePin, OUTPUT);
    pinMode(ledPin, OUTPUT);
 

    digitalWrite(enablePin, HIGH);
  }
void loop() {

    if (digitalRead(switchPin) == HIGH) {
      digitalWrite(motor1Pin, LOW);   
      digitalWrite(motor2Pin, HIGH);  
    }

    else {
      digitalWrite(motor1Pin, HIGH);  
      digitalWrite(motor2Pin, LOW);  
    }
  }

Final Project

Full Project Documentation

here: Brain Controlled CNC Documentation

Proposal

Overview

For my final project I’m interested in building a drawing machine that uses light as a medium and uses electrical impulses of the brain read through a scanner to determine the drawings.


Details

I’m looking at this as a design project and the final product will be a machine that artists can use to make abstract drawings through light. The final result of the artistic process with the machine would be a printed image.

The machine will essentially be a small Computer Numeric Control (CNC) machine that will have the ability to move in two dimensional space with the help of two stepper motors. It will have an RGB LED attached to the end that will be able to move along the x & y axis. There will be a camera on top that will be taking high exposure images of the light moving smoothly in space. These images will then be combined to make a composite image that will then be printed.

The movement of the light will be determined by the inputs from the brain scanner. The following inputs will be used:

1. Excitement levels of the wearer

2. Thinking Up

3. Thinking Down

4. Thinking Left

5. Thinking Right

The excitement levels of the wearer will determine the color of the light. Blue will represent low and red will represent high levels of excitement. The color change would occur as the LED moves in space and will affect the final printed product. The Up, Down, Left & Right thoughts will control movement of the LED on the x & y axis.

LightMachine.png

Parts

Brain Input Device (check) Arduino CNC Kit 2 Stepper Motors Powerful RGB LED Gear Strips

Further Research

BUILD A CNC http://forum.arduino.cc/index.php?topic=20873.0

http://www.instructables.com/id/Arduino-CNC/

LIGHT DRAWINGS

https://terrylongimagery.files.wordpress.com/2013/10/1982_18.jpg

https://stuartnafey.smugmug.com/Art/Light-Doodles/i-CWTf84n/0/X2/daisies-X2.jpg

https://findlaydonnan.files.wordpress.com/2011/10/absurdist-portrait-of-dena-with-umbrella-and-bike-12-5mins.jpg

http://madebyjoel.com/wp-content/uploads/2010/03/Joel-Henriques-light-drawing-4.jpg


BRAIN INTERFACE CONTROL https://emotiv.com/epoc.php

https://www.youtube.com/watch?v=JvxdbpTcTnc