Essay: Final Project (Rodrigo Reyes)

The Better Reader 

The Better Reader is a project to help people with dyslexia or people with reading issues be able to read with more agility and accuracy. It will draw its inspiration from dyslexia reading exercises and the game of Wack-A-Mole.

The project’s foundation will be to develop interaction between the computer (using Arduino and Processing), and the human user. First of all, it will have communication between two languages in the computer world, which are Arduino and Processing. These two together will be interacting together to create animation,  audio, text, and sound depending on the human’s response to the computer. The interaction that we will design is supposed to be easy for the users to figure out. This last will be explained in the following paragraph.

The Better Reader will draw upon common exercises that are used to improve eyesight, as well as exercises for reading more quickly, and will combine this with the concept of the Wack-A-Mole game. These exercises which we draw upon have also been proven useful for people with dyslexia. A user will see on the computer (Processing will be used for the animation) three columns of three words each (nine words in total). One word is going to blink (disappear and appear) from the top left one by one and row by row until it reaches the last word and it goes back to the top to start again. This will allow the user to direct his attention to the word that is blinking, facilitating the interaction between humans and machines. The program will randomly stop at any given word and it will ask the user to identify the last word that disappeared and appeared. It will give for options (four words), and if you select the correct word, the program will accelerate the word blinking pattern to make it harder for the user to follow along. The user will have three “lives” (opportunities to lose and keep playing). To make it more engaging we will use Arduino to connect to a console that has four electronic buttons. These electronic buttons will have the word options written on them. This means that we will have to program the buttons to give different four-word options on each level, and it will obviously have to include the right choice in one of the buttons. The user will have a time limit to choose the right answer; we are thinking of limiting this time to five seconds. We want to have a hammer similar to the one in the Whack-A-Mole game so that the users can quickly hit the given answer.  Furthermore, we would like to have a scoreboard with the ranking of the people that have “played” this game in hopes of incentivizing friendly competition.

This exercise should be useful as it would allow users to develop their peripheral view, their concentration, and their short term memory.  It is not going to feel like those tedious exercises that we who have dyslexia have to do but is rather going to feel like we are just playing a game.  I think that understanding the struggle of dyslexia will push our team to focus on creating not just an exercise for reading but a game that is fun. Something that can put learning and fun together. Hopefully, there will be much to gain not just for people with dyslexia but for everyone. 

Media Controller – Stephanie Anderson 003

The Process

For this week’s recitation, I was starting ambitious and was originally going to create a program that would allow me to adjust the tint of a picture using a light sensor. I was going to make boundaries using different ranges of the light and then try and adjust the tint on a smoother scale. The first problem that I ran into was that the light sensor I checkout required a special bread board which I was not familiar with. The next attempt at using a light sensor included using the one given to us in our kit. Unfortunately, I was not successful in this venture either. I ended up creating a program that allowed me to control the speed of a video with a potentiometer. In theory, this should have been pretty simple, but it took me a while to figure out how to write all the code that I needed. 

I ran into problems with being able to manipulate the speed of the video. I figured out that the issue was that I needed to switch two lines of code:  myMovie.loop() and myMovie.speed(). When I switched these lines in my setup() function then I was able to manually adjust the speed for the video. After this, I ran into another problem where I was unable to variablize the speed function. I originally made my own class, but then I realized that was ineffective. I was not able to call the class I created in the setup() function. I ended up creating a while loop that allowed me to have the sensorValue from the Ardunio potentiometer to manipulate the speed of the video. 

ARDUNIO CODE:

// IMA NYU Shanghai
// Interaction Lab
// This code sends one value from Arduino to Processing

void setup() {
Serial.begin(9600);
}

void loop() {
int sensorValue = analogRead(A0) / 4;
Serial.write(sensorValue);
map(sensorValue, 0, 255, 0, 10);
// too fast communication might cause some latency in Processing
// this delay resolves the issue.
Serial.print(sensorValue);
delay(10);
}

////////////////////////////////////////////////////

PROCESSING CODE:

import processing.video.*;
import processing.serial.*;
Serial myPort;
int sensorValue;

Movie myMovie;
void setup() {
size(700 , 1100);
frameRate(200);
myMovie = new Movie(this, “lilydumb.mp4”);
// myMovie.play();
myMovie.loop();

while(sensorValue> 0){
int x = sensorValue;

myMovie.speed(x);

}

printArray(Serial.list());

myPort = new Serial(this, Serial.list()[ 2 ], 9600);

}

void fastness(int x){
while(sensorValue > 0){
x = sensorValue;

}
}

void draw() {
if (myMovie.available()) {
myMovie.read();
}

image(myMovie, 0, 0);

while ( myPort.available() > 0) {
sensorValue = myPort.read();
}
println(sensorValue);//This prints out the values from Arduino
}

VIDEO:

https://drive.google.com/open?id=1kAzAEmWEq-JeKoO3K3kIbpL3thKqEagZ

After reading through the article, “Computer Vision for Artists and Designers,” by Levin, it made me think about some of the presentations from the past weekend from the “Machine Art” workshops. Simone spoke very passionately about his belief that  machines are only as smart as we make them. In the article, Levin articulates the power of the machine, but says how, in the past, the power of machines have been predominately used by the military and other government powers. Levin does mention, however, that the rise of modern technology has led to more open-sourcing and more community efforts on home-made projects.  I think this concept that he is referencing here is why I love working with Ardunio and Processing so much. They both have such diverse communities that include people of all backgrounds who are willing to anyone who presents a problem. Taking open-ended questions like our recitation and using our imagination to come up with projects that will be helpful is the magic of design and the benefit of engineering. 

Sources:

Levin, G. “Computer Vision for Artists and Designers: Pedagogic Tools and Techniques for Novice Programmers”. Journal of Artificial Intelligence and Society, Vol. 20.4. Springer Verlag, 2006. Reas, Casey and Fry, Ben. Processing: A Programming Handbook for Visual Designers and Artists. MIT Press, 9/2007. ISBN: 978­026218262. 

Recitation 9: Media Controller – Elysia

In this week’s recitation, we were told to use Arduino and processing to manipulate the media attributes using the physical controller in Arduino. I decided to use an image to be manipulated. At first, i was using the position of the x and y of the mouse to change the size of the image, but i decided that it does not fit what i was going to do. I want to use two potentiometers to control two different things in the image. One potentiometer to control the length of the snow on the bottom of the image, the other one is for the snow that falls. I made the snow with for loops that we learned in class, but i made some modifications to make it seem smaller and use the value from the potentiometer to control the frequency of the for loop.

The code is attached below:

Arduino

void setup() {
Serial.begin(9600);
}

void loop() {
int sensor1 = analogRead(A0);
int sensor2 = analogRead(A1);
/// int sensor3 = analogRead(A2);

// map(sensor1, 0, 1023, 0, 255);

// keep this format
Serial.print(sensor1);

Serial.print(“,”); // put comma between sensor values
Serial.print(sensor2);

// Serial.print(“,”);
// Serial.print(sensor3);

Serial.println(); // add linefeed after sending the last sensor value

// too fast communication might cause some latency in Processing
// this delay resolves the issue.
delay(100);
}

Processing

import processing.serial.*;
PImage photo;
String myString = null;
Serial myPort;


int NUM_OF_VALUES = 2;   /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/
int[] sensorValues;      /** this array stores values from Arduino **/
//float psensorValue0;
//float psensorValue1;

void setup() {
  size(800, 800);

  photo = loadImage("image.jpeg");
  setupSerial();
}


void draw() {
    background(#74CFD8);
  updateSerial();
  printArray(sensorValues);
  float m = map(sensorValues[0], 0, 1023, 0, 100);
   float n = map(sensorValues[1], 0, 1023, 0, height); //left
  image(photo, 0, 0, width, height);
 for (int i=0; i<m; i++) {
    int size = int( random(1, 15) );
    int x = int( random(photo.width) );
    int y = int( random(photo.height) );
    // get the pixel color
    color c = photo.get(x, y);
    // draw a circle with the color
    fill(#FFFFFF);
    noStroke();
    ellipse(x, y, size, size);
    rectMode(CENTER);
    rect(400, 800, 800, n);
  //  filter(BLUR, m);


}}



void setupSerial() {
  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[ 3 ], 9600);
  // WARNING!
  // You will definitely get an error here.
  // Change the PORT_INDEX to 0 and try running it again.
  // And then, check the list of the ports,
  // find the port "/dev/cu.usbmodem----" or "/dev/tty.usbmodem----" 
  // and replace PORT_INDEX above with the index number of the port.

  myPort.clear();
  // Throw out the first reading,
  // in case we started reading in the middle of a string from the sender.
  myString = myPort.readStringUntil( 10 );  // 10 = '\n'  Linefeed in ASCII
  myString = null;

  sensorValues = new int[2];
}



void updateSerial() {
  while (myPort.available() > 0) {
    myString = myPort.readStringUntil( 10 ); // 10 = '\n'  Linefeed in ASCII
    if (myString != null) {
      String[] serialInArray = split(trim(myString), ",");
      if (serialInArray.length == NUM_OF_VALUES) {
        for (int i=0; i<serialInArray.length; i++) {
          sensorValues[i] = int(serialInArray[i]);
        }
      }
    }
  }
}

Recitation 9 Media Controller

Recitation 9 Media Controller 

During this recitation I used a potentiometer connected to Arduino as the controller of the speed of a video file uploaded to processing. 

(Video used uploaded by Charles Icay )

For the Arduino code, I used the class example code for one variable from Arduino to processing. while the code for processing is as follows:

import processing.serial.*;
import processing.video.*;
Movie myMovie;

Serial myPort;
int valueFromArduino;

void setup() {
fullScreen();
// size(800,800);
background(0);
myMovie = new Movie(this, “dog.mp4”);
myMovie.loop();

printArray(Serial.list());
// this prints out the list of all available serial ports on your computer.

myPort = new Serial(this, Serial.list()[24], 9600);}

void movieEvent(Movie movie) {
myMovie.read(); }

void draw() {
while ( myPort.available() > 0) {
valueFromArduino = myPort.read(); }
println(valueFromArduino);//This prints out the values from Arduino

background (0);
image(myMovie, 0, 0);
float newSpeed = map(valueFromArduino, 0, 255, 0.1, 5);
myMovie.speed(newSpeed);}

The result was successful as I managed to make the video go faster and slower depending on the potentiometer values as show in the screen video below that was taken while I made the potentiometer values smaller and higher. 

As the reading Computer Vision for Artist and Designers,  explained “The intervening decades of research have yielded a great wealth of well­understood, low­level techniques that are able, under controlled circumstances, to extract meaningful information from a camera scene. These techniques are indeed elementary enough to be implemented by novice
programmers at the undergraduate or even high­school level.” which can be applied to today’s recitation, as just using a potentiometer, the computer vision can be modified as the user pleases. The ability for the user to change the computer vision as he pleases is the substance of interactivity as there is communication between the participant and the computer.