Wednesday, February 2, 2011

Moral Technology


Tasked with creating a moral or amoral technology, our group generated several potential maxims. As a tool, Elizabeth proposed the use of a praxinoscope, a Victorian self-propelled animation device, to send subliminal messages through rotation. This led to a discussion concerning the type of messages the scope could convey and the moral implications of those messages.

The praxinoscope requires a 360° rotation to work as an animation device, however the Servo Motor (which we programmed to run through an Audrino) is limited to a 180° range of movement. Therefore, we decided to incorporate the servo’s ability to stop anywhere between 0° and 180°. This led our group to the story of the Russian cognitive psychologist and the peasant:
 “And let me tell you a story: the Russian cognitive psychologist, Vygotsky, who worked just after the Russian Revolution, worked with peasants, some of whom had been to the collective schools and some of whom had not. And he gave them little tests. And the basic pattern of the test was "Put together the things that go together." So he showed this peasant a hammer, a saw, a hatchet and a log of wood, and he said, "Put together the things that go together." And the peasant said, "Well, clearly, what goes together is the log of wood and the hatchet and the saw because you use the hatchet and the saw to cut the wood for firewood." And Vygotsky said—and this was his regular strategem—"I have a friend who says that the saw, the hammer and the hatchet go together because they are tools." And the peasant answered, "Then your friend must have a lot of firewood!" (Schon, 1987, para. 4).

With this story in mind, we came up with the idea for a device which would indicate the right or wrong combination of items.  We programmed the servo to stop on five items, and react to each item with a red or green light as follows:

1. A hammer / 30 degrees/ opposite colour cyan/ green LED
2. A saw/ 60 degrees/ opposite colour magenta/ red LED
3. The hatchet/ 90 degrees/opposite colour yellow/ green LED
4. Log of Wood/ 120 degrees/ opposite colour black/ red LED
5. Saw going through Wood/ 150 degrees/opposite colour white/ green LED

Our intention was to show the moral dilemma of society’s privileging of some opinions as “right” while others are considered “wrong”. If this device was to be used as a teaching tool, it would privilege the ideas those whom “have a lot of firewood” over those who must group the items in such a way to keep themselves warm. 
 
Bruno Latour views technology as delegated human activity.  As creators of technology we remove humanity from a task and replace it, in the case of our project, with a computerized device that can only indicate right or wrong answers: “If, in our societies, there are thousands of such lieutenants to which we have delegated competences, it means that what defines our social relations is, for the most part, prescribed back to us by nonhumans” (Latour, 1988, p. 310). The device we created allows us to sit back and be told the right answer.  It removes the thought process behind the question: which of these objects belong together?

Tuesday, February 1, 2011

Profiling Machine: Second Attempt

This is the second attempt at controlling an arduino with a physical analog input.
After searching for some code to hack on the interweb I found this one by Professor Nashid Nabian in an Interactive Architecture course slide.  It controls a standard servo (180 degrees) with a potentiometer (also 180 degrees).  I find the 1:1 relationship between control and output very satisfying.

The code was adapted to show 'right' and 'wrong' at discreet angles.

The next step is to build a physical setup around it (images on the dial) that correspond to the type of moral machine we're interested in.

Code:

 /*A Moral technology by Breadboards are us
this code is a modified version of
Nabian's Responsive System Input Potentiometer- Output Standard Servo-
After a failed attempt to use push buttons to send exact angles to the
servo I found this code in an old Interactive Architecture course archive,
I really enjoy the direct relationship of turning a potentiometer and turning
a servo, moreover this code by N.Nabian has the analogRead (reading from
potentiometer) and servo control in two separate pieces of code, making it
very easy to do something extra with the reading from the potentiometer. 
AL */

//connect the potentiometer as follow:
//left from ground to left pin, Center to analog input pin number 0 , right to V5
//connect the motor as follows:
//black to ground, Red to V5, yellow to digital output pin number 13
//potentiometer range is 0-1024

void setup(){
  Serial.begin(9600);
  pinMode(13,OUTPUT);  //sets servo output on pin 13
  pinMode(5,OUTPUT);  //sets a green led output to pin 5
  pinMode(6,OUTPUT);  //sets a red led output to pin 6
  pinMode(7,OUTPUT);  //sets a green led output to pin 7
  pinMode(8,OUTPUT);  //sets a red led output to pin 8
  pinMode(9,OUTPUT);  //sets a green led output to pin 9 
}
void loop(){
  int val = analogRead(0); //this part of the code reads the signal from pot
  servoPulse(13,val);
  Serial.println(val);
 
  if (val > 160 && val < 180) // if the pulse is at about 30 degrees
{digitalWrite(5,HIGH);} //turn a green led on
 else  // if it is not
 {digitalWrite(5,LOW);} //turn a green led off

  if (val > 335 && val < 347) // if the pulse is at about 60 degrees
{digitalWrite(6,HIGH);} //turn a red led on
 else  // if it is not
 {digitalWrite(6,LOW);} //turn a red led off

  if (val > 504 && val < 518) // if the pulse is at about 90 degrees
{digitalWrite(7,HIGH);} //turn a green led on
 else  // if it is not
 {digitalWrite(7,LOW);} //turn a green led off

  if (val > 675 && val < 690) // if the pulse is at about 120 degrees
{digitalWrite(8,HIGH);} //turn a red led on
 else  // if it is not
 {digitalWrite(8,LOW);} //turn a red led off

   if (val > 845 && val < 860) // if the pulse is at about 90 degrees
{digitalWrite(9,HIGH);} //turn a green led on
 else  // if it is not
 {digitalWrite(9,LOW);} //turn a green led off

 }


void servoPulse(int pin, int angle){  // this part of the code by N.Nabian
  int pulseWidth = (angle*2)+500;  //controls the servo position
  digitalWrite(13,HIGH);  //based on the pot
  delayMicroseconds(pulseWidth);
  digitalWrite(13,LOW);
  delay(20);
}


Images:

 

Profiling Machine: First Attempt

In our first discussion/brainstorm our team centered on the idea of a profiling machine.  The machine would take the form of a dial controlled by a servo that points to right or wrong answers.

The first idea was to control the servo angles using discrete push buttons.
This failed miserably.

Code:

/*A Moral technology by Breadboards are us
this code combines an Alternating switch program with a servo
position program to create an (im)moral profiling machine*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
int pos = 0;  //variable to store the servo position

int switchPin1 = 1;  //switch is connected to pin 1
int vaLone;  //variable for reading the pin status
int buttonState1;  //variable to hold the last buttonState

int switchPin2 = 2;  //switch is connected to pin 2
int vaLtwo;  //variable for reading the pin status
int buttonState2;  //variable to hold the last buttonState


void setup()
{
 myservo.attach(9);  // attaches servo on pin 9 to the servo object
  pinMode(switchPin1,INPUT); //Set the switch pin as input
  pinMode(switchPin2,INPUT); //Set the switch pin as input
  Serial.begin(9600); // Set up serial communication at 9600bps
 buttonState1 = digitalRead(switchPin1);  // read the initial state
buttonState2 = digitalRead(switchPin2);  // read the initial state

}

void loop()
{
  vaLone = digitalRead(switchPin1);  //read input value and store it in val
  //if (vaLone != buttonState1)  {  //the button state has changed!
  if (vaLone == HIGH)  {  // check if the button is pressed
  pos = 10;
  myservo.write(pos);  //if it's pressed send it to angle 20
  }
  else  {  //the button is not pressed
    pos = 0;
  myservo.write(pos);
  }
 
buttonState1 = vaLone;  // save the new state in button's variable

  vaLtwo = digitalRead(switchPin2);  //read input value and store it in val
  //if (vaLtwo != buttonState2)  {  //the button state has changed!
  if (vaLtwo == HIGH)  {  // check if the button is pressed
  pos = 180;
  myservo.write(pos);  //if it's pressed send it to angle 20
  }
  else  {  //the button is not pressed
    pos = 0;
  myservo.write(pos);
  }
 
buttonState2 = vaLtwo; //save the new state in button's variable


}


Images: