Final Project Essay

Robert Prast and Roberto Noel

Interaction Lab

Professor Marcela

April 26, 2017
Strolling down any major Shanghai street you can notice a series of bumps and grooves, which to the common eye have no evident purpose. However, after learning from my Chinese friends that these bumps are put in place to assists blind people walk along the street we began to look at them as a source of artificial sight. We wanted to expand on this artificial sight and essentially extend the site past just the street.
To put this idea into a reality we intend on pairing ultrasonic sensors and speakers. With a series of three ultrasonic range sensors suspended across a hat. The three sensors will be positioned on the left, center, and right of the frames with all the sensors angled downward. We have not decided on the final angle yet, but through our prototypes and testing/experimenting we can finalize the angle. When an object passes the threshold of the range sensors, the corresponding buzzer will go off. For example, if the left sensor detects an object the left buzzer will go off and if the center one detects an object both the left and right buzzer will sound.Picture1

 

One of the more recent developments in this kind of technology is a cane that has sensors on it and can alert you about the objects around it. The problem, however, is that this cane can easily be lost as it is not a wearable and it doesn’t tell you the direction from which objects are coming from.  We think that our invention solves these two problems.Picture2

Additionally, in the spirit of interaction, which we define for our project as connecting an unknown experience to a user, we will have a processing sketch that will simulate how a blind person would go about using our system. Therefore, we will have a sketch randomly generate items, whose relative position in the sketch can be translated to a relative position in real life. To put this simply, if an object randomly generates on the right side of the sketch, the buzzer on the right will go off. The object will continue to buzz until the user moves their head to a different direction. For now, we want the sketch to run for 2 to 3 min and to have the user completely blind folded to fully simulate the sensation of being blind.

Picture3

We think this project is a good first step towards the development of a more complex product which would integrate sonic sensors with binaural (3D) sound. This product would provide similar sensations to echolocation and would be a good navigational assistant for the blind. We hope that this project provides some insight into how the final product would function.

Picture4

3D

Roberto Noel
Midterm Project
Professor Marcela
4/21/2017

For this project I used Tinker Cad. I decided to use an accelerometer in a game controller. Before starting I went online and found that the dimensions of the accelerometer were 20mm by 20mm. These served as my guidelines later for creating a slot for the accelerometer.

After obtaining these dimensions, I went into Tinker Cad and using the Playstation Move controller as a reference, started modeling. First, I made a handle with a diameter of a little over two inches (I found that this would probably be comfortable to hold). Because I didn’t want to copy the Playstation Move exactly, I made the ball on the top significantly larger. This would provide for an interesting weight distribution on the controller which could more easily simulate what you would feel when holding something like a tennis racket which is more top-heavy.

Then it was time to work on creating the slot for the accelerometer. To start, I put a base box which would make a smoother plane to cut into (I didn’t want to cut the slot directly into the cylindrical handle). After that, I used another box with the dimensions of the accelerometer and cut that shape into the handle using the “hole” function.  I also grouped all these shapes together to make them easy to work with.

Lastly, I decided to brand the controller so I created text with the words “Magic Wand” and grouped them on to the controller.

This was an interesting project because, although I had 3D modeled before, I had never given much though to the real-world dimensions of the product I was creating. Tinker Cad made it really easy to change these dimensions and make them actually useable. It was also a very easy program to use compared to the previous ones I had been exposed to (Blender and Meshmixer).

Screen Shot 2017-04-21 at 1.32.31 PMScreen Shot 2017-04-21 at 1.38.30 PMScreen Shot 2017-04-21 at 1.45.10 PM Screen Shot 2017-04-21 at 1.45.04 PMScreen Shot 2017-04-21 at 1.45.15 PM Screen Shot 2017-04-21 at 1.45.56 PMScreen Shot 2017-04-21 at 1.51.29 PMScreen Shot 2017-04-21 at 1.52.22 PM

Stamp Documentation

Roberto Noel
Midterm Project
Professor Marcela
4/18/2017

This project was interesting. I had never used Illustrator before but I got the hang of it pretty quickly. My idea was to trace a smiley face, but I didn’t want to do it exactly as the base image so I made it a bit weirder and gave it some hair. I watched the video tutorial at the same time as making the stamp so I learned how to use the program in sync with the tutorial.

First I got a picture of the smiley face off Google and then I added a layer on top of it that I could use to trace the original image. Since it was just a smiley face this was quite easy. Then I got a red circle since the laser cutter only sees red, and using  the pathfinder, I made an inverse image of it. After that, the last step was to use transform and flip it.

Unfortunately, I had to travel to Guangzhou on Friday so I wasn’t able to make it to the Autodesk offices.


Screen Shot 2017-04-18 at 4.51.16 PM Screen Shot 2017-04-18 at 4.51.56 PM Screen Shot 2017-04-18 at 4.58.48 PM Screen Shot 2017-04-18 at 4.58.52 PM Screen Shot 2017-04-18 at 5.03.48 PM Screen Shot 2017-04-18 at 5.11.09 PMScreen Shot 2017-04-18 at 5.12.47 PMScreen Shot 2017-04-18 at 5.14.44 PM

Above is the screenshots of my process for creating the laser cut document for my stamp.

Midterm Project Roberto Noel- NFC Door Unlock

Roberto Noel
Midterm Project
Professor Marcela
4/1/2017

NFC Door Unlock
Partner:Robeter Prast

Materials: Breadboard, Arduino UNO , NFC Module from DFRobot, 360 Degree Servo, Duct Tape, Wires

Idea: Our idea came from wanting to make getting into the dorm room simpler. Every student already has to have their NYU student cards on them to sign out of the dorm, so it would be beneficial to have a system to incorporate this technology in our rooms. At first I wasn’t quite sure of the popularity and simplicity of NFC, but after realizing how reliant Apple Pay and Google Pay are on this technology it seemed to be a perfect fit for our idea.

Code: Our code wasn’t too complex, however in order to work with our specific NFC module we had to use a custom library to make things works smoothly. This was pretty easy to do, since you can just drag the file into the library folder. Controlling the servo was quite simple too since I had worked with servos in my last project. The code overall is simple and easy to follow.

Implementation: To bring our idea to life, we simply tapped the NFC module and arduino UNO to the front of the door in the center, and used long wires that ran through the crack in the door to a servo on the other side near the lock. Although not the most elegant design, it was functional and got the job done. The servo pulled down a duct tape piece that was connected to the lock to forcibly unlock the door. After finding the best location for the motor, the door unlocked easily.
breadboard2 servo

Conculsion and What I learned: Doing this project, I learned a lot about the application of NFC technology, and how it is so common place in our daily life now. Additionally, I learned about how the arduino communicates on the RX and TX pins. In the end, working on this project was fun, rewarding, and taught me alot about using ardiuno.

Serial Communication L

Instructor: Marcela

Class: Interaction Lab

Objective: The purpose of this lab was for use to learn how to use serial communication to create interaction between Arduino and processing. We got to learn how to do this both ways, so inputs from Arduino would create a reaction in processing and vice-versa.

Process: We decided to start with inputs coming from processing and then going to Arduino and then later focus on Arduino inputs going to processing. The idea was that processing would create an image of three circles RYG and when you clicked a circle, the corresponding LED would turn on. Then there would be a light sensor on the Arduino that would change the image of the three circles depending on how much light it detected.

These were our materials:

17440121_968901336577530_1593351041_n

The set up for the lights was easy, simply connect each light to a pin and a resistor and then ground all the lights. The light sensor was a bit harder because we needed to connect it to three things, an analog read, a power source and a ground. This is what the three lights looked like all set up.

17410436_968901313244199_1910479419_n

I decided, however, that if I were to add the light sensor, the wiring would make it difficult to see each light, so I used a small breadboard to separate the lights from the big breadboard and then add in the sensor:

17439614_968901286577535_152248237_n

After the wiring was set up, the rest was up to the coding. For processing, we just drew the three circles with the corresponding colors and according to which circle you clicked it would send a value (R, Y, G) to the Arduino code. The Arduino code then used if statements that were dependent on the value sent through serial communication and the corresponding light on the breadboard would light up according to that:

17409919_968901289910868_162082970_n

Next we had to do serial communication from the light sensor to the processing image. We set up an analog read on the light sensor and a serial write that would send that value to processing. Then we set up if statements that would turn a certain circle black according to different intervals.

After that we were done:

17410218_968901256577538_1829545693_n 17409810_968901246577539_1817100506_n

Result: We learned a lot from this lab, the concepts were still relatively simple but the syntax and certain mechanics of the coding were interesting to learn.

 

The processing code is this (I couldn’t figure out how to post both codes in the bottom):

import processing.serial.*;
Serial myPort;
int valA; //value from arduino
int x, y, z;
void setup() {
myPort = new Serial(this, Serial.list()[2], 9600);
// Change the Serial.list()[0] to your port
size(500, 200);

}
void draw() {
ellipse(250, 100, 100, 100); //red
fill(x, 0, 0);
ellipse(100, 100, 100, 100); //green
fill(0, y, 0);
ellipse(400, 100, 100, 100); //yellow
fill(z, z, 0);

// to send a value to the Arduino
if (dist(mouseX, mouseY, 250, 100) < 50){
if (mousePressed) {
myPort.write(‘Y’);
//println(‘Y’);
}
else {
myPort.write(‘y’);
//println(‘y’);
}
}
if (dist(mouseX, mouseY, 100, 100) < 50){
if (mousePressed) {
myPort.write(‘R’);
//println(‘R’);
}
else {
myPort.write(‘r’);
//println(‘r’);
}
}
if (dist(mouseX, mouseY, 400, 100) < 50){
if (mousePressed) {
myPort.write(‘G’);
//println(‘G’);
}
else {
myPort.write(‘g’);
//println(‘g’);
}
}

x = 255;
y = 255;
z = 255;
while(myPort.available() > 0){
valA = myPort.read();
}
println(valA);
if(valA > 220 && valA < 250){
x = 0;
}
else if(valA < 220 && valA > 200){
z = 0;
}
else if(valA < 200){
y = 0;
}
}

int valA, val;

void setup() {
  Serial.begin(9600);
  pinMode(11, OUTPUT); //red
  pinMode(10, OUTPUT); //yellow
  pinMode(9, OUTPUT); //green
}

void loop() {
  // receive a value from processing
  while (Serial.available()) {
    val = Serial.read();
  }
  // test the value
  if (val == 'R') {
    digitalWrite(11, HIGH);
  } else if (val == 'r') {
    digitalWrite(11, LOW);
  }
//  delay(10); // wait for Processing
  if (val == 'Y') {
    digitalWrite(10, HIGH);
  } else if (val == 'y') {
    digitalWrite(10, LOW);
  }
//  delay(10); 
  if (val == 'G') {
    digitalWrite(9, HIGH);
  } else if (val == 'g') {
    digitalWrite(9, LOW);
  }
//  delay(10); 

  
  valA = analogRead(0)/4;         // read voltage value 
//  Serial.println(valA);
  Serial.write(valA);
  delay(10); 
}

Stoplight Lab – Lab 2

Instructor: Marcela

Class: Interaction Lab

Objective:

The purpose of this lab was to learn how to use the Arduino with the breadboard to create a circuit that we could control from our computer. We learned how to ground the circuit and how to use digital and analog pins as well as the 5v pin.

Process:

I started out by connecting three wires, one for each of the main lights of the stoplight. Then, I connected the resistors. I also used a button as an input to be used as the alert for someone crossing the road. After that, I set up the remaining two LEDs with resistors and the wiring was complete.

Since the code was provided to use for this lab, it was very easy because all we had to do was make the circuit.

17409705_968895143244816_1798717272_n

17409815_968895146578149_551211080_n17439808_968895153244815_1898274927_n

Next we had to make a circuit in which we controlled an RGB  LED with variable resistors.

Ir was a similar concept except this time, we had three inputs to control one output. The hardest part was getting the orientation of the RGB light correct since it is hard to tell which prong does what. Eventually we got it working, and using the code provided to us, we had fun playing around with the different lights.

17409978_968895159911481_1866352975_n 17439645_968895156578148_1616170394_n

Result: This was a fairly simple lab but it helped establish some very fundamental concepts about circuits. We also learned how to use different components such as variable resistors.

 

Sensor Lab – Roberto Noel

Date: Mar 10, 2017 Friday
Instructor: Marcela
Project: Sensor Lab

Intro:

The aim of this lab was to learn how to use sensors. Going in to this lab, I knew it would be very useful, especially for my stupid pet trick project. Initially, I wanted to use a sonic distance sensor, but the one I received outputted wrong values so I decided to go with the Infrared Sensor instead. My goal was to be able to change the color of an LED using this sensor at different distances.

17102014_958176210983376_1627618031_n17203797_961580580642939_857485187_n

Process:

The most tedious part of this process was hooking up the right wires to the right holes in the breadboard and the Arduino. I also had to search online to see which wire on the infrared sensor corresponded to each function. Eventually I got everything hooked up correctly. This part of the process helped me a lot because I learned how to create more complex circuits with an input and an output.

.17124835_958176237650040_1130828083_n17141427_958176227650041_1962188472_n

Once that was all hooked up, I started coding. This took a while because I had to map the 0 – 1023 values to 0-255 in order for it to control the color. Initially, I didn’t know how to do this, but I googled it and found out.

Once the code was all sorted, it worked very well.

Video: https://www.youtube.com/watch?v=0dHCT5yv66A

Reflection:

This lab was very useful, it taught me how to use the IR Distance Meter and how to code for it. I ended up using this sensor in my stupid pet trick project.

//#include <SoftwareServo.h>

float map_distance = 0;
const int LEDR = 11;
const int LEDB= 9;
const int LEDG = 10;

int r = 0;
int g = 0;
int b = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(LEDR,OUTPUT);
  pinMode(LEDG,OUTPUT);
  pinMode(LEDB,OUTPUT);

  


}

void loop() {
  // put your main code here, to run repeatedly:
  map_distance = map(analogRead(3),0,1023,0,100);
  Serial.println(map_distance);
  
//  if (map_distance > 10){
//    analogWrite(LED,map_distance);
//  }
//  else{
//    digitalWrite(LED,LOW);
//  }
  if (map_distance > 10 && map_distance < 30){
    r = 255;
    g = 0;
    b = 0;
  }
  else if (map_distance > 31 && map_distance < 60){
    r = 0;
    g = 255;
    b = 0;  }
  else {
    r = 0;
    g = 0;
    b = 255;
  }
  analogWrite(LEDR,r);
  analogWrite(LEDG,g);
  analogWrite(LEDB,b);
}

Stupid Pet Trick – Roberto

Date: Mar 10, 2017 Friday
Instructor: Marcela
Project: Stupid Pet Trick
Intro:
Before completing this project, I was very confused as to what I could do with the limited knowledge of programming I have. Thankfully, in the past few labs we learned how to use essential components that would help me for this lab (sensors and servos).
To come up with my idea, I began with this premise: Every great invention solves a widespread problem. And then I completely disregarded that premise and created something utterly useless, a machine that high-fives you. I knew from the beginning that this machine had no potential, and after finishing coding it and putting the parts together, I saw for certain that I had accomplished absolutely nothing. It was perfect.
The Process:
The steps that went into creating this were fairly simple. I started out by gathering the hardware components: a servo, an infrared distance sensor and a bunch of wires. I hooked up the infrared sensor to the Arduino’s analog input via the breadboard and the servo through the digital input. That was pretty much it for the hardware side of it. I did run in to one problem however, when I was connecting the wires to the infrared sensor, one of the female slots on the sensor broke. To fix it I used tape.
17203777_961580560642941_1885130219_n
After that was fixed and it was all wired and ready to go, I put all the components in a box so that it wouldn’t look so messy.
 17198761_961580583976272_1135404179_n
Then I started working on the code which was fairly simple. All I had to do was read the information from the analog input and map it to values between zero and one hundred. After that I created an if statement that said if the mapped value was greater than ten, it would move the servo 110 degrees.
Once the code was done, I had to complete the hardware side of the project by creating the arm that would high-five you. I made that out of styrofoam and cardboard and attached it to the servo with a hot glue gun. I also hot glued the servo and the IR sensor to the box.
17203601_961580617309602_1317679024_n17198316_961580623976268_1811225667_n
Video: IMG_4279 or https://youtu.be/Efi5mCr2XoU
Reflection:
I learned a lot from this project. Initially, I underestimated my ability to create something like this but I surprised myself and learned quite a bit. Although there were small challenges along the way, over all everything went pretty smoothly. I am looking forward to doing my final project and know I will have more tools by then to create something really cool.
#include <Servo.h>
// sets up global variables
float map_distance = 0;
const int servo_1 = 11;
int angle = 0;
Servo myservo;
void setup() {
  // sets up servo and IR
  Serial.begin(9600);
  pinMode(servo_1,OUTPUT);
  myservo.attach(9);
}

void loop() {
  // maps IR read to value between 0 and 100
  map_distance = map(analogRead(3),0,1023,0,100);
  // prints the IR value for testing purposes
  Serial.println(map_distance);x
  // sets up conditions for moving the servo to high five it
  if (map_distance > 20){
    angle = 90;
  }
  else {
    angle = 3;
  }
  myservo.write(angle);
}

LAB 3 ANIMATION

Instructor: Marcela

IMG_4222

I created a face which has moving eye balls.

To make the eyes I used arcs and changed their color using the fill function

for the eyeballs I made smaller versions of the previous arcs and then filled them out with black

for the mouth I used a line and another arc to make his mouth open

for the teeth I made several rectangles spaces ten pixels apart

the eyebrows were tricky because I had to rotate them to get the correct angle and since my axis of rotation was on the top right corner, I had to re-input the coordinates of the eyebrows.

To create the eyeball movement I used three variables and some if statements setting the boundaries for their movement.

 

With this lab I learned many functions on processing and how code can  do animation. I used programming skills I had learned before in a graphical way and that was very interesting.

float x = 130;
float x_2 = 370;
float t = 0;
void setup(){
  background(255, 200, 0);
  frameRate(20);
  size(500,500);
}

void draw(){
  fill(255, 130, 200);
  arc(130, 210, 150, 170, PI, 2*PI, CHORD);
  arc(370, 210, 150, 170, PI, 2*PI, CHORD);

  
  pushMatrix();
  fill(0);
  arc(x, 210, 30, 35, PI, 2*PI, CHORD);
  arc(x_2, 210, 30, 35, PI, 2*PI, CHORD);
  if (x < 190) {
    if (t == 0){
      x++;
      x_2++;
    }
  }
  if (x == 190){
    t = 1;
  }
  if (t == 1){
    x--;
    x_2--;
  }
  if (x == 70){
    t = 0;
  }
  
  popMatrix();

  
  strokeWeight(5); 
  line(30, 350, 470, 350);
  arc(253, 350, 200, 120, 0, PI, CHORD);
  fill(210, 100, 230);
  arc(253, 380, 160, 65, 0, PI, CHORD);
  fill(255);
  
  strokeWeight(0);
  rect(250, 348, 10, 35);
  rect(265, 348, 10, 35);
  rect(235, 348, 10, 35);
  rect(280, 348, 10, 35);
  rect(220, 348, 10, 35);
  rect(205, 348, 10, 35);
  rect(295, 348, 10, 35);
  rect(190, 348, 10, 35);
  rect(175, 348, 10, 35);
  rect(310, 348, 10, 35);
  rect(325, 348, 10, 35);
  fill(0);
  pushMatrix();
  rotate(radians(int(30)));
  rect(60, 0, 150, 15);
  popMatrix();
  pushMatrix();
  rotate(radians(-30));
  rect(220, 250, 150, 15);
  popMatrix();
}

First Documentation

Instructor: Marcela

IMG_4043

In this lab we learned about circuits, the first circuit was a button that activated a speaker.  The button cut the circuit and then when it was pressed it reconnected it and made the sound.

IMG_4045The second circuit was two LED lights. at first it didn’t work because the LED pins were in the wrong holes.

 

IMG_4046

This is it working after reconfiguiring the pins on the LEDs

With this lab I learned a lot about how circuits work and the difference between in series and parallel circuits. This will help a lot when I work on hardware for my projects.