Midterm 1st step and serial communication 2 week 6
We start working in our midterm idea we would like to create an interface for the computer. Our first idea it was to replace the keyboard in order to release the stress that we put in our wrist when we work in the computer. This piece was inspire by people who suffer of Carpal Tunnel Syndrome. Because we only have two weeks to complete this project we decide it to only imitate the mouse. Our final approach it was quite different that we thought. I will explain more soon.
The good news is that the serial communication lab that we have to do for this week was very helpfull to test all the sensors and understand visually the movement of the cursor using processing.
Bellow is step by step in our process. Ufff a lot hours of work 🙂
This is the photo documentation of the mat prototype:







This is all the 6 sensors working, 4 work as analogs and two digital. We look very happy
This is the documentation of the serial communication in processing
As I say before we took another different approach. We ore going to hack a mouse. The rotary tracks of the mouse inside are going to be connected to a dc motor and they will move them from one direction. We are going to have two of them. Bellow is Gordie working on it and the best part is working
Bellow is the call an response hand shake method, Gordie and Emily are the stars of this video
Idea for the Midterm
I’m very exited about my next project with Emily and Gordie, bellow is our idea and research, enjoy:
Power Presentation:
Images Observation:

“We spent a lot of time in front of the computer and we only use our hands, which generates a lot health issues like carpal tunnel syndrome. Our idea with this is to create an interface that could help the interaction with the computer from another perspective. We could redesign the computer interface similar to piano pedals and some kind of mouse and switch that could replace many functions of the mouse.
Here, the action is clicking and typing on the keyboard mouse. The medium is the computer program and the changes will be the behavior of the computer. The goal of clicking and typing of the computer is to create, change, modify or delete information.
The physical parameters of this activity are limited to your hands and eyes. The person engaged will only use his hands and eyes, while his legs and arms basically do nothing. The posture almost doesn’t change, so this also generates problems in your back, neck, hips and some cases legs. While working on the computer your focus is mainly on the screen and keyboard. The activity is engaging because we have a constant overflow of information. The stress on your hands wrist and the fact you don’t move the body for a long time”

Serial communication Week 1
Code 1:
int analogPin = 0;
int analogValue = 0;
void setup()
{
// start serial port at 9600 bps:
Serial.begin(9600);
}
void loop()
{
// read analog input, divide by 4 to make the range 0-255:
analogValue = analogRead(analogPin);
analogValue = analogValue / 4;
Serial.print(analogValue, BYTE);
// pause for 10 milliseconds:
delay(10);
}Code 2:
import processing.serial.*;
Serial myPort; // The serial port
int graphXPos = 1; // the horizontal position of the graph:
void setup () {
size(400, 300); // window size
// List all the available serial ports
println(Serial.list());
myPort = new Serial(this, Serial.list()[0], 9600);
background(113,86,86);
}
void draw () {
// nothing happens in draw. It all happens in SerialEvent()
}
void serialEvent (Serial myPort) {
// get the byte:
int inByte = myPort.read();
// print it:
println(inByte);
// set the drawing color. Pick a pretty color:
stroke(123,128,158);
// draw the line:
line(graphXPos, height, graphXPos, height – inByte);
// at the edge of the screen, go back to the beginning:
if (graphXPos >= width) {
graphXPos = 0;
// clear the screen:
background(113,86,86);
}
else {
// increment the horizontal position for the next reading:
graphXPos++;
}
}
Week 4 Analog Output
Bellow is more documentation of my Analog Output Lab. I though it would be nice for future reference to have a better angle of the wires and Arduino. Also it was important to make interact real people with my chicken fighters. I hope you enjoy:


My wires:


Here is the code:
/*
Servo control from an analog input using the Arduino Servo library
This example code uses the Arduino Servo library which comes packaged with the Arduino software.
In order to make this work, you must include the Servo.h library file, create an instance of the Servo object,
attach a digital PWM pin to the Servo object, and then write an analog value to the Servo object to set its
position.
The difference between using the Servo library and the older method of pulsing a digital pin is that the library
handles a lot of the work for you. You no longer need to figure out the translation between pulse length and position.
You now can simply specify the angle you’d like your servo to be at and it will turn to that position.
Please note, unlike the older pulsing method you MUST use a digital PWM pin or it will not work.
by Rory Nugent
Created 20 Jan. 2009
*/
#include <Servo.h> // include the servo library
Servo servoMotor;
Servo servoMotor2;// creates an instance of the servo object to control a servo
int analogPin1 = 0; // the analog pin that the sensor is on
int analogValue1 = 0; // the value returned from the analog sensor
int analogPin2 = 1; // the analog pin that the sensor is on
int analogValue2 = 0; // the value returned from the analog sensor
int servoPin1 = 9; // Control pin for servo motor, must be a PWM pin
int servoPin2 = 10; // Control pin for servo motor, must be a PWM pin
void setup() {
servoMotor.attach(servoPin1); // attaches the servo on pin 9 to the servo object
servoMotor2.attach(servoPin2); // attaches the servo on pin 9 to the servo object
}
void loop()
{
analogValue1 = analogRead(analogPin1); // read the analog input (value between 0 and 1023)
analogValue1 = map(analogValue1, 0, 1023, 0, 179); // map the analog value (0 – 1023) to the angle of the servo (0 – 179)
servoMotor.write(analogValue1); // write the new mapped analog value to set the position of the servo
analogValue2 = analogRead(analogPin2); // read the analog input (value between 0 and 1023)
analogValue2 = map(analogValue2, 0, 1023, 0, 179); // map the analog value (0 – 1023) to the angle of the servo (0 – 179)
servoMotor2.write(analogValue2); // write the new mapped analog value to set the position of the servo
delay(15); // waits for the servo to get there
}
Bellow is final project in the Analog Output Lab
Bellow is step by step the development of the lab










Understanding Electricity- Week 3
1. Measuring Voltage







2. A Basic LED Circuit

3. Components in Series
















Analog Input, Getting Creative, Love meter week 2 (1)
int potPin = 0; // Analog input pin that the potentiometer is attached to
int potValue = 0; // value read from the pot
int Greenled = 9; // PWM pin that the GreenLED is on. n.b. PWM 0 is on digital pin 9
int Yellowled = 10; // PWM pin that the YellowLED is on.
int Redled = 11; // PWM pin that the redLED is on.
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(Greenled,OUTPUT);
pinMode(Yellowled,OUTPUT);
pinMode(Redled,OUTPUT);
}
void loop() {
potValue = analogRead(potPin); // read the pot value
Serial.println(potValue);
if(100 <= potValue && potValue < 441)
{
digitalWrite(Greenled,HIGH);
digitalWrite(Yellowled,LOW);
digitalWrite(Redled,LOW);
}
else if(441 <= potValue && potValue < 782)
{
digitalWrite(Greenled,HIGH);
digitalWrite(Yellowled,HIGH);
digitalWrite(Redled,LOW);
}
else if(potValue >= 782)
{
digitalWrite(Greenled,HIGH);
digitalWrite(Yellowled,HIGH);
digitalWrite(Redled,HIGH);
}
else
{
digitalWrite(Greenled,LOW);
digitalWrite(Yellowled,LOW);
digitalWrite(Redled,LOW);
}
/*
if (0 < potValue <341) {
analogWrite(Greenled, potValue/4); // PWM the Green LED
delay(10); // wait 10 milliseconds before the next loop
}
if (201 <potValue <682) {
analogWrite(Yellowled, potValue/4); // PWM the Yellow LED
delay(10);
}
if (401<potValue <1023) {
analogWrite(Redled, potValue/4); // PWM the Yellow LED
delay(10);
}*/
}
Analog Input week 2 (1)
int potPin = 0; // Analog input pin that the potentiometer is attached to
int potValue = 0; // value read from the pot
int led = 9; // PWM pin that the LED is on. n.b. PWM 0 is on digital pin 9
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
potValue = analogRead(potPin); // read the pot value
analogWrite(led, potValue/4); // PWM the LED with the pot value (divided by 4 to fit in a byte)
Serial.println(potValue); // print the pot value back to the debugger pane
delay(10); // wait 10 milliseconds before the next loop
}
Analog Input using a potentiometer from Lina Giraldo on Vimeo.
Observation Assignment
I worked with Gordie and Emily Ryan. We decided to go to a crowded bar and use the opportunity of the super bowl to do our observation assignment.
My first super bowl! Great ! It was at 6:30 pm and the name of the bar is Down The Hatch. I believe there were some 140 people between 21 through 40, mostly students. I actually never understood who was playing or whom I should cheer for.
Anyway, we were expecting to see the bar packed but it was not the case. We had to stand at the corner of the kitchen and lucky enough, this was the best view of the bar. This is why we stayed there. During this important event, people don’t stop communicating between each other. The food arrives at people’s tables. The customers are drinking and using their phones, some of them are talking, others are texting and some cameras here and there. The bartender smiling and working non stop receiving credit cards and serving drinks. Always using technology to solve social interaction but off course the most important for society: joy and have fun.
Here is how we have to think about technology as a social tool that bridges humankind
Women mostly use cell phones, while men were focused on the game. They were texting mainly during the commercials. They used mainly smart phones, blackberries and iPhones. They also had digital cameras which they used to take pictures of each other drinking, having fun, posing, etc.
In the back of the bar, they use a calculator to do the books at the end of the day. The credit card machine is next to the bartender to create easy access. This was the most used machine in the hole assignment, running almost non-stop.
And off course there are the HD TVs in each corner of the bar the tables are arranged around them.
We are creative animals that could think. This is why we are always creating system of communication and social solutions to increase trade.
Digital Input (a switch), Digital Outputs (LEDs)-Week 1
Final Frog Switch LEDs Physical Computing from Lina Giraldo on Vimeo.














This is the video documentation of the Digital Input and Output (a switch and LED’s)
Switch with two LEDs inside of the frog from Lina Giraldo on Vimeo.
Video Documentation Digital Input (a switch and Digital Output LED’s red and Yellow)
Week 1 Lab 1 from Lina Giraldo on Vimeo.
Code:
// declare variables:
int switchPin = 2; // digital input pin for a switch
int yellowLedPin = 3; // digital output pin for an LED
int redLedPin = 4; // digital output pin for an LED
int switchState = 0; // the state of the switch
void setup() {
pinMode(switchPin, INPUT); // set the switch pin to be an input
pinMode(yellowLedPin, OUTPUT); // set the yellow LED pin to be an output
pinMode(redLedPin, OUTPUT); // set the red LED pin to be an output
}
void loop() {
// read the switch input:
switchState = digitalRead(switchPin);
if (switchState == 1) {
// if the switch is closed:
digitalWrite(yellowLedPin, HIGH); // turn on the yellow LED
digitalWrite(redLedPin, LOW); // turn off the red LED
}
else {
// if the switch is open:
digitalWrite(yellowLedPin, LOW); // turn off the yellow LED
digitalWrite(redLedPin, HIGH); // turn on the red LED
}
}












Final Stage “Could you please describe with one word the US”
Final
Here after a lot frustration I decide it to parse the definition of the word when you rollover it. The definition is from dictionary.com. The parsing of the image work fine when is offline but when is online doesn’t work. I have the right proxy I’m not sure what is the real problem.
The result now is when you click the image it disappear and leaves like a shadow behind
I was trying to grab the word and move it to any place on the screen t but didn’t work it jumps back to the same position
I click in the image turn green first and red and jump it’s a mistake
When I click the image it turn red and jump into the right
When I click the image turn red an dissapear
If I rollover the image the words change color to red and stop
The words all appears at once and they move to the left
The words appear all at the same time
Object Oriented 3rd try
Object Oriented 3rd try
Object Oriented 2nd try
Object Oriented 1st try
Function Oriented
This is the processing sketch without object oriented and array.


















