Final Project Reflection

FeedBot – Russel Sy – Rudi

As I have said previously, the conception of my ideas were based off of the goal to encourage a new and beneficial idea. In this case, the original goal of my project was to encourage a user to eat healthier. The original plan was to lay out different healthy and unhealthy foods on a table, and the user would but the food into a basket and then a screen would tell the user how good or bad the food is for you, as well as nutritional and health facts. 

  

After user testing, I listened to the feedback given to me and made adjustments to my final idea. In order to incorporate the physical part of my project with the digital, as well as creating a more cohesive and creative take on eating better, Rudi helped me think of putting a robot head on top of a computer that eats food cards, while the screen displays the robots body. If the robot were to eat a bad food, the robot would malfunction and then the screen would show bad facts about the food. On the other hand, if the robot were to eat good food, the robot would work perfectly and facts about healthy eating would appear. Later on, the idea expanded beyond food and went into life habits as well like smoking. One thing that I did not think about previously, but heard from user testing, was to incorporate sound into my project. Thinking back over it, the final project would not be very interesting at all if there was no sound and auditory feedback when the user interacted with it. I incorporated background music, as well as positive and negative auditory feedback like “yay” or “malfunction” when a good or bad card was placed into the robot mouth.

 

The conception of this final idea started with a drawing, which then went to 3D designing and finally printing. The thing about the 3D printing process that I would have liked to change is the size of my 3D printed robot head, as well as the amount of inside cross fills. The robot head for the purposes of my project was too big, which made it a little heavy for attaching to the screen of my laptop using a hook. If the laptops screen were to be angled too far back, the screen would bend all the way down due to the weight of the robot head. Other than making the head smaller, another way to solve this problem would be to reduce the filling crosses in order to make the robot head lighter. This would make it so that the screen wouldn’t fall backwards due the the the robot head weight. Other than those problems that I couldn’t fix, I also had to solve problems before the printing process. For the design of the robot head, the outside was quite simple, but the inside was hollow. From experience, 3D printing something that is hollow on the inside can lead to problems and bad printing. In order to solve this, I printed the head in 2 separate parts – the bottom which housed the hole and the mouth opening, and then the top which just acted as a cap for the hole. Since the cap was printed separately from the main part, the plastic did not get the chance to melt and start sagging into the hollow space. I also made the inside of the mouth opening angle downwards so that when a card was inserted into the mouth, it would slide down with ease. One thing I wish I could’ve done after the fabrication process would be to spray paint the whole unit, in order to give it a more final and polished look.

  

In the IMA showcase, I was able to show my project to strangers who had no previous knowledge of the class. Although I had to prompt them to put the cards into the mouth, they were able to figure out the purpose of the project without any further explanation. After going through all the cards, the users would ask me if they were correct in their thoughts on the purpose. Most thought it was a good way to teach young kinds about good life habits, and that the idea could be expanded upon further using more cards and visuals. In this sense, the goal of my project was met. For my definition of interaction, I think that my project was interactive. The audience was able to participate and even children were able to use my project. Inserting a card into the mouth of the robot was like feeding a little pet or baby, which added to the interactivity. And the audience was able to leave learning something new. A great comment I had received was from a teacher who said this project would be really useful in her classroom since her class was just starting to learn about balanced meals and healthy diets.

If I had more time, I would have liked to create more food cards, as well as improve the design of the cards to make it more obvious as to what the cards represented. I would have also liked to redesign the head to make it less bulky and a lot lighter. As for the visuals, I would have liked to create an animation to complement the “malfunction” animation, since there was no animation for the “yay” part of my project. For the future, I now know that 3D printing is a whole process and the first 3D printed object may not be the best representation of your work. Subsequent versions have to be made after the first in order to improve and evolve with your ideas.

To conclude, I feel like this project can be used to give a different approach to teaching children good life skills and habits, as interactive learning is always better than reading bland and boring texts.

FINAL PROJECT ESSAY

Veggie-table

From my previous definition of interactivity, I decided that interactivity not only meant actual interaction, but also included the understanding of how a machine works and what its purpose is, as well as leaving the interaction with something being learned. That means a successful interactive project for me would have to be one that addresses a problem the user may have, and attempt to fix it.

The issue I try to tackle in this project comes from people’s diets, and the lack of vegetables or other healthy foods in some people’s daily food intake. The target audience would be people roaming around in grocery stores, buying their groceries. As some people walk by the vegetables section, they would not bat an eye, but my project would aim to draw people into the vegetable section, and encourage them to buy more vegetables.

The way that my project would work requires simple sensors from arduino, and visuals from processing. A person would walk through the vegetable isle and see a screen with a bunch of different vegetables laid in front of it. The screen would say “Pick one up and see what happens” and a sensor would sense when the if a certain vegetable is picked up. On the screen would display the vegetable’s nutrition facts, as will as a bar that would be filled up as the customer would pick up more and more vegetables. If the customer picks up a sufficient amount of vegetables, the screen would say “Congratulations! You now have a balanced diet!”

What my project basically aims to do is to give information about health and encourage better choices to be made in an interactive and aesthetically pleasing way. The way that most people find out about nutrition in grocery stores nowadays is by looking at the nutritional facts label at the back of the food packaging. Other than being boring and tedious to read, some people might not even know what those nutrients are good for, or what the recommended amount daily nutrients should be. Instead of reading the back of the food label, my project will display the health benefits or drawbacks of a vegetable or an unhealthy food on the screen, while encouraging the person buy more healthy foods rather than unhealthy foods. In order to make the project impact the audience, I plan to use live facial tracking on processing to place the persons head on top of a body. If the person gets more healthy foods, the body will get more fit, and more and more health benefits of eating well will be displayed, whereas the opposite would happen if the person would pick up more unhealthy foods. 

I plan to brainstorm visual ideas and sketch out the project until the 27th, and then spend until December 4th creating the processing visuals, and then combining it with arduino sensors with the different foods until the 7th, and lastly go through final testing and last minute changes before showing the final product. 

From what I’ve researched, there does not seem to be any physical form of my project idea, but there are only interactive websites which can visually display the health benefits and drawbacks of foods in a visually pleasing way for children. I feel like because I plan to make my project large and physical, as well as targeting older audiences rather than younger ones with harsher and more personal imagery, the impact my project will have on one’s diet will be greater than the simple online healthy food games that I’ve found.

Recitation 8: Serial Communication

Introduction

The purpose of this recitation was to use serial communication in order to communicate between processing and arduino with more than one variable.

Etch-a-sketch

We were tasked with creating an etch-a-sketch using values taken from potentiometers on arduino then translating it to a line being drawn on processing. I first started by creating a code on processing in which I could draw a line using my mouse, and clear the line by pressing the enter key.

  stroke(100);
  strokeWeight(4);
  line(mouseX,mouseY,pmouseX,pmouseY);
  if (keyPressed) {
    if (key == ENTER) {
      background(200);

Afterwards, I created a circuit on arduino with two potentiometers, and created code in order to print the values of both the potentiometers.

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

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

  Serial.print(sensor1); 
  Serial.print(",");
  Serial.print(sensor2);
  Serial.println();

  delay(100);
}

After creating the two separate codes, I used the serial communication template for communication between arduino to processing. I had to tweak the values on the line() function so that instead of reading the x and y values from the mouse in order to draw the line, the values from the potentiometers on arduino were used instead. 

// IMA NYU Shanghai
// Interaction Lab
// For receiving multiple values from Arduino to Processing

/*
 * Based on the readStringUntil() example by Tom Igoe
 * https://processing.org/reference/libraries/serial/Serial_readStringUntil_.html
 */

import processing.serial.*;

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 **/
int previousSensorValues1;
int previousSensorValues2;


void setup() {
  size(1023, 1023);
  background(200);
  setupSerial();
}


void draw() {
  updateSerial();
  printArray(sensorValues);

  stroke(100);
  strokeWeight(4);
  line(previousSensorValues1,previousSensorValues2,sensorValues[0],sensorValues[1]);
  previousSensorValues1 = sensorValues[0];
  previousSensorValues2 = sensorValues[1];
  
   if (keyPressed) {
    if (key == ENTER) {
      background(200);
    }
   }
}

void setupSerial() {
  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[7], 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[NUM_OF_VALUES];
}

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]);
        }
      }
    }
  }
}

Musical Instrument

The coding for the second task was a little more straightforward. I started with the arduino coding and creating the circuit. Using the serial communication template, I created the code so that if the value of an array sent from processing was 1, then a tone would play from the pitches.h file, and if the the value was 0, then nothing would play. From processing, if the mouse were clicked, then a value of 1 would be sent.

// IMA NYU Shanghai
// Interaction Lab


/**
  This example is to send multiple values from Processing to Arduino.
  You can find the Processing example file in the same folder which works with this Arduino file.
  Please note that the echo case (when char c is 'e' in the getSerialData function below)
  checks if Arduino is receiving the correct bytes from the Processing sketch
  by sending the values array back to the Processing sketch.
 **/

#define NUM_OF_VALUES 2    /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/
#include "pitches.h"

/** DO NOT REMOVE THESE **/
int tempValue = 0;
int valueIndex = 0;

/* This is the array of values storing the data from Processing. */
int values[NUM_OF_VALUES];


void setup() {
  Serial.begin(9600);
  pinMode(10, OUTPUT);
}

void loop() {
  getSerialData();

  // add your code here
  // use elements in the values array
  // values[0]
  // values[1]
if (values[0] == 1) {
  tone(10, values[1]);
}
else {
  noTone(10);
}

}


//recieve serial data from Processing
void getSerialData() {
  if (Serial.available()) {
    char c = Serial.read();
    //switch - case checks the value of the variable in the switch function
    //in this case, the char c, then runs one of the cases that fit the value of the variable
    //for more information, visit the reference page: https://www.arduino.cc/en/Reference/SwitchCase
    switch (c) {
      //if the char c from Processing is a number between 0 and 9
      case '0'...'9':
        //save the value of char c to tempValue
        //but simultaneously rearrange the existing values saved in tempValue
        //for the digits received through char c to remain coherent
        //if this does not make sense and would like to know more, send an email to me!
        tempValue = tempValue * 10 + c - '0';
        break;
      //if the char c from Processing is a comma
      //indicating that the following values of char c is for the next element in the values array
      case ',':
        values[valueIndex] = tempValue;
        //reset tempValue value
        tempValue = 0;
        //increment valuesIndex by 1
        valueIndex++;
        break;
      //if the char c from Processing is character 'n'
      //which signals that it is the end of data
      case 'n':
        //save the tempValue
        //this will b the last element in the values array
        values[valueIndex] = tempValue;
        //reset tempValue and valueIndex values
        //to clear out the values array for the next round of readings from Processing
        tempValue = 0;
        valueIndex = 0;
        break;
      //if the char c from Processing is character 'e'
      //it is signalling for the Arduino to send Processing the elements saved in the values array
      //this case is triggered and processed by the echoSerialData function in the Processing sketch
      case 'e': // to echo
        for (int i = 0; i < NUM_OF_VALUES; i++) {
          Serial.print(values[i]);
          if (i < NUM_OF_VALUES - 1) {
            Serial.print(',');
          }
          else {
            Serial.println();
          }
        }
        break;
    }
  }
}

I then went to make the processing code. I made it so that if the mouse was pressed, the x value of the mouse would be recorded and sent to arduino in order to play a pitch corresponding to that x value.

// IMA NYU Shanghai
// Interaction Lab


/**
 * This example is to send multiple values from Processing to Arduino.
 * You can find the arduino example file in the same folder which works with this Processing file.
 * Please note that the echoSerialData function asks Arduino to send the data saved in the values array
 * to check if it is receiving the correct bytes.
 **/


import processing.serial.*;

int NUM_OF_VALUES = 2;  /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/


Serial myPort;
String myString;

// This is the array of values you might want to send to Arduino.
int values[] = new int[NUM_OF_VALUES];

void setup() {
  size(500, 500);
  background(0);

  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[7], 9600);
  // check the list of the ports,
  // find the port "/dev/cu.usbmodem----" or "/dev/tty.usbmodem----" 
  // and replace PORT_INDEX above with the index 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;
}


void draw() {
  background(0);

if (mousePressed) {
  values[0] = 1;
}
else {
  values[0] = 0;
  }
  
  values [1] = mouseX;


  // sends the values to Arduino.
  sendSerialData();

  // This causess the communication to become slow and unstable.
  // You might want to comment this out when everything is ready.
  // The parameter 200 is the frequency of echoing. 
  // The higher this number, the slower the program will be
  // but the higher this number, the more stable it will be.
  echoSerialData(200);
}

void sendSerialData() {
  String data = "";
  for (int i=0; i<values.length; i++) {
    data += values[i];
    //if i is less than the index number of the last element in the values array
    if (i < values.length-1) {
      data += ","; // add splitter character "," between each values element
    } 
    //if it is the last element in the values array
    else {
      data += "n"; // add the end of data character "n"
    }
  }
  //write to Arduino
  myPort.write(data);
}


void echoSerialData(int frequency) {
  //write character 'e' at the given frequency
  //to request Arduino to send back the values array
  if (frameCount % frequency == 0) myPort.write('e');

  String incomingBytes = "";
  while (myPort.available() > 0) {
    //add on all the characters received from the Arduino to the incomingBytes string
    incomingBytes += char(myPort.read());
  }
  //print what Arduino sent back to Processing
  print( incomingBytes );
}

Recitation 1: Electronics

Introduction

For this recitation, I had to build 3 basic circuits using the different components of Arduino.

Materials

  • 1 * Breadboard
  • 1 * LM7805 Voltage Regulator
  • 1 * Buzzer
  • 1 * Push-Button Switch
  • 1 * Arcade Button
  • 1 * 220 ohm Resistor
  • 1 * 10K ohm Resistor
  • 1 * 10K ohm Variable Resistor (Potentiometer)
  • 1 * LED
  • 1 * 100 nF (0.1uF) Capacitor
  • 1 * 12 volt power supply
  • 1 * Barrel Jack
  • 1 * Multimeter
  • Several Jumper Cables (Hook-up Wires)

Circuit 1: Doorbell

For this circuit I had to make a doorbell using a buzzer and a button so that when the button is pressed, the circuit is completed creating the buzzer sound.

 

Circuit 2: Lamp

In the second circuit, similar to the first, I had to create a “lamp” using an LED light. Creating this circuit only meant replacing the buzzer with an LED. The button was also there so that when it was pressed, the LED would turn on.

 

Circuit 3: Variable Lamp

For the third circuit, I attached a potentiometer and let Arduino read its values. I connected the LED to a PWM input which let it read analog signals, and by doing so, I was able to control the brightness of the LED using the potentiometer.

Questions:

1) Circuit interactivity

  • In its most basic form, these circuits were interactive because of the use of the button and the potentiometer— I press a button and the light turns on, or I twist a knob which controls the brightness of the light.

2) Interaction in art

  • Art itself is meant to grab people’s attention. Interactivity can be used as a very effective tool in attracting people towards the art. Art in the traditional sense is meant to be looked at, however, if the viewer were to be part of the art viewing experience, being able to change the art itself with their interaction, then people will be more likely to be interested in it. Using the Wooden Tile Mirror as an example, the viewer is able to project their physical form onto a mirror created with wooden tiles. This creates an abstract image of the viewer, changing the art viewing experience.

FINAL PROJECT PROPOSAL

From my previous definition of interaction, all my projects focus on encouraging people to do something– encouraging people to engage in activities or to better themselves.

“Dance Visualizer”

The issue I try to tackle in this project is the lack of physical activity in some people. Rather than trying to encourage exercise in the traditional sense (going to the gym, playing sports, etc), I try to encourage it through something that everyone can do in the comfort of their own homes– dancing. Although everyone can dance or has tried to dance, it can often be frustrating if one cannot get the moves right. This can create a negative feedback loop and discourage people from continuing to dance. One way I thought to tackle this problem would be to create an immediate visual aid as one dances. 

The visuals would come from processing, and the sensing of the dancer’s movement would come from arduino. The way this project would work is that pressure sensors would be placed at the bottom of the dancers feet, inside a shoe, and when a dancer would step and execute a dance move, a visual representation would be displayed through processing. Because of this, even if the dancer were to make a wrong move, a nice visual would still be displayed, disregarding the fact that the dancer did a wrong move.

The way in which the visuals would work would rely on different combinations of steps from both the left and right feet of the dancer. For example, if the dancer were to step once on their right foot, a bouncing ball would show up, or if the dancer were to step once on the right and twice on the left, lines would move across the screen. Because of the multiple combinations of foot movement, the dancer could freestyle their dances and yield many different visualizations. This allows the dancer to get new feedback from the visualizer every time they dance, making dancing a new and refreshing experience every time.

“Veggie-table”

The issue I try to tackle in this project comes from people’s diets, and the lack of vegetables in some people’s daily food intake. The target audience would be people roaming around in grocery stores, buying their groceries. As some people walk by the vegetables section, they would not bat an eye, but my project would aim to draw people into the vegetable section, and encourage them to buy more vegetables.

The way that my project would work requires simple sensors from arduino, and visuals from processing. A person would walk through the vegetable isle and see a screen with a bunch of different vegetables laid in front of it. The screen would say “Pick one up and see what happens” and a sensor would sense when the if a certain vegetable is picked up. On the screen would display the vegetable’s nutrition facts, as will as a bar that would be filled up as the customer would pick up more and more vegetables. If the customer picks up a sufficient amount of vegetables, the screen would say “Congratulations! You now have a balanced diet!”

The visualizations can be customized, but the general idea is to inform the customer of the nutritional benefits of each of the vegetables they pick up, and then encourage the customer to pick up more vegetables. The screen could also show different recipes that the vegetable could be used in.

“See, Touch, Piano”

In this project, I try to encourage people to play the piano through visual representations of music. People can often be discouraged from playing the piano due to how they perceive the difficulty of starting to play, which makes them not want to start playing in the first place. My project would be placed in public places with a piano where anyone can walk up and start playing.

The way in which my project works is similar to that of my first idea “Dance Visualizer”. Touch sensors would be placed in the keys of a piano and detect when the key is pressed. Processing would then take these different combinations of notes and turn them into visuals in a screen. Different combinations of 1, 2, 3, or more notes would turn into moving visuals on the screen. In this way, the person playing the piano would not only get positive feedback from the harmony in the notes they play, but also nice visual feedback showing the harmonies. Because of this double positive feedback loop, the person would be more encouraged to start playing the piano because of this enjoyable experience.