In this recitation, I used a map function in serial communication between processing and Arduino. I had it recording the value of my sensor, as seen in the image below in the console of processing. The sensor is connected to Arduino but collects the number from the sensor for how hard it was pressed, and then if it reaches a specific amount of pressure, it sends turns a light on as well as turns to the next “page” in processing, controlling the screen.
This is the same code I used for my final project since I was in the states for the last recitation, but after looking at workshop slides and documents, I changed the declaration of the sensors in Arduino to have it use the map function.
For our project, we first knew that we wanted to do something focusing on criminal justice. We decided to make an interactive “game” (if you can call it that) that educates people on the topics of wrongful convictions and life v death sentences. We had a series of cases that appeared on the screen and the user was instructed to select either a punishment or if the person we spoke about was innocent of guilty. Initially, we wanted to have a motor attached to the user either in a bracelet or a chair to simulate the electric chair (not really electrocuted) to show tell what happened to the person who’s fate they determined if they got the verdict wrong. We later altered this to make it seem more focused on the user being the judge. My partner and I did this by using sensors connected to arduino that determined whether or not they had been hit by a gavel (which is what a judge uses when making a final verdict.) We placed the sensors on two blocks as well that were meant for the gavel. After a case was presented, the user hot either the right or the left block, each corresponding with a different decision. For other parts of our presentation, we wanted it to be fairly simple in a way that would make it seem serious and professional, but still effective. We had a plain black background and white typewriter font that played on the screen so it would type out while the user was reading it. During user testing, there were a few people who asked about inserting pictures, but we decided against it to keep people focused on the text and sound since it was time-sensitive. We were also aware of the fact that the text was displayed very fast, but this was in order to make the user more anxious about their decision and feel the same pressures that someone with this responsibility has. By making them feel like the judge, a new understanding of how these convictions come about arises. After they are out, we give them the details of what actually happened in the specific case they made the wrong conviction for. This was meant for them to see how easy it is not to look at the specific parts of a case that may just prove the “criminal” innocent. We added a radar sound as our background sound. We did this to make users anxious and really feel the weight of their decision. We thought about changing it, but it worked exactly the way we wanted to in user testing so we kept it. We also 3D printed something to hold our physical timer (also from Arduino) and green and red lights that are lit up depending on if the user makes the right verdict.
FABRICATION AND PRODUCTION:
After user-testing we decided to change several aspects of our project. For one, as I already mentioned, we added the sensors from arduino so that the user could hit a gavel to make a verdict.
Before user-testing we had the screen controlled only by arrow keys with the keyPressed() function, so we had to change some code from only processing to arduino to have it take information both ways. We also had way too many wires with nowhere to hide, so we 3D printed something to hold all of our wires behind the computer. It held the lights and timer in the front and the wires went through our 3D printed objects and then out the other side, which was hidden.
Also, at user-testing, we only had the physical timer, but we heard from several users that they also wanted to see it on the screen, so we had it displayed in both places for out final. We added sounds for when the user got something right or wrong. We painted the 3D printed object black to match the appearance of what we displayed on the screen. All of the explanations for the cases were added after user testing because users wanted to know the details on why their verdict was incorrect. We changed the font to the typewriter to match the sound and style of the project. At the beginning, we came across several issues with the sounds interrupting each other, not stopping, or playing at the wrong times. The keyPressed function when we used it caused a lot of issues when we wanted things to happen at other times than when only the keys were pressed since they controlled almost everything else. At one point the timer would also only work on some occasions and would skip on certain cases. Since we had to code every light in the timer, it made it extremely confusing when we wanted to move it from the breadboard.
The wires got inserted incorrectly at first and it took way longer than it should have to fix. This made some of the numbers appear as if they were repeating but really it was just that one light out of the seven wasn’t lighting up.
CONCLUSIONS:
Ashley and I wanted to find an interactive way to inform people about criminal justice issues, mainly wrongful convictions and issues regarding the death sentence. We wanted our users to be the judge when making a verdict. By doing this, we hoped to put them in the judge’s place to be able to see how the details in the cases that proved them innocent were missed or manipulated. I think that our information was executed well, but there were definitely parts of our design that could have been better if given the time. One issue we had was the text writing out too fast. We wanted it to be fast so that the user would feel the anxiety and make a rushed decision, just like how judges often react to pressures in court, but instead, people got stressed and thought it was an accident rather than being intentional. At the final IMA show, we found that many adults when using out projects weren’t completely sure if it was over after the “check your assumptions” page. If we had the time, I think adding something to restart it with a button would have been a better indicator. We did have sounds and lights for when they were wrong, but they didn’t know that when they were wrong the entire thing was over. Also if they wanted to retry the game, they would have to wait for all the text to type out for the first few questions and wound up waiting for a long time. We decided to make it so that you would have to wait so that people wouldn’t hit it more than once after one question and have it skip too fast and miss the next question completely. Other than minor issues in the end, people said that they learned something and they enjoyed how they learned the information we were giving them. We got the responses we wanted overall, and users at the IMA show were eager to play again. I defined interaction before this project as something that can give incentives and rewards to a user to attract them to it, giving information and then receiving feedback. I think that my partner and I did a much better job on this project in that aspect. The users wanted to get to the next level; their incentive was to win. By making them want something, they were eager to read the information we were hoping to educate them on and needed to understand it in order to succeed in the game. They had the ability to make choices (verdicts) as a judge, making them feel as though they really had that responsibility, and then the output was informing them how that action would have affected society (because we used true events). I think that the sounds, colors, style, and way they used it (with the gavel and hitting it) all made it feel as if they were truly the judge and made them more immersed in the project. Since this is a topic that I am very passionate about, I was very pleased with the reactions of the project. I saw people engaged and excited while interacting and learning about the criminal justice system. Some people did seem a little bit hesitant at first to try the project if they had no knowledge of it before, so maybe if it was more private they wouldn’t feel too much pressure to pick the “right” answer. One thing I definitely learned from this project is that the small things matter!! Even something that you might not think of at first, for example, the speed of the text, made people feel very different about their interaction. The timer on the screen having one digit, or 4 digits when counting down also changed the agency of the user. The things that were most important at the end were some of the smaller things I wouldn’t have thought of at the beginning or by myself without user-testing. Overall I am very proud of this project and I think i successfully made it interactive, although there’s always room for improvement, I think by the end I knew what things I would have liked to change if I had time to make it better for the user. I felt like I made an engaging way to learn about a very deep and serious topic that many people would typically steer away from.
For this recitation, I made my own image invert when a button is pressed in arduino. First I made sure that the information from the arduino button was sending to processing, and then added the image and inversion inside of an if statement in processing.
After reading Computer Vision for Artists and Designers, I reflected on how technology was used in my project. The user’s input causes Arduino and processing to communicate and creates an output. They already communicate to have the picture show, but then works again with each other in order to have to filter. It is very similar to the emotion detecting project that was mentioned in the reading. It was communicating the whole time, taking in the data from the camera, but once the person’s facial expressions fit certain criteria (like pressing the button on mine) an alarm would sound saying that they needed to be more expressive.
// IMA NYU Shanghai
// Interaction Lab
// This code receives one value from Arduino to Processing
import processing.serial.*;
Serial myPort;
int valueFromArduino;
void setup() {
size(800, 531);
background(0);
printArray(Serial.list());
// this prints out the list of all available serial ports on your computer.
myPort = new Serial(this, Serial.list()[2], 9600);
}
void draw() {
// to read the value from the Arduino
background(0);
//ellipse(250,250,valueFromArduino,valueFromArduino);
while ( myPort.available() > 0) {
valueFromArduino = myPort.read();
}
PImage photo;
photo = loadImage("pitt.png");
image(photo, 0, 0);
if (valueFromArduino == 1){
println("1");
filter(INVERT);
}
println(valueFromArduino);//This prints out the values from Arduino
}
“Are You Going to be a Criminal?/Check your Assumptions”
My partner Ashley and I decided to make a project called “Are You Going to be a Criminal?/Check your Assumptions.”
PROJECT STATEMENT OF PURPOSE
Our project is going to be based on criminal justice and informing people of the realities of criminals and the system. It is an interactive video game project that will include quizzes and activities asking the user “what is a criminal” and questions about topics that most people are misinformed about. We want our users to be more informed and then rethink the assumptions and prejudices they have made in the past. Being well informed, our users will be safer as well as more likely to help improve the current situation of the justice system.
PROJECT PLAN
We will be using Processing and Arduino to make our project. The game and quizzes will be made and displayed on the screen through processing. We will have many physical ways for users to take this quiz using Arduino, for example, we will put them in a situation, and if they think the criminal turn a doorknob(and have them turn the potentiometer), bang on the door(pressure sensor), or ring the doorbell (button plus a buzzer.) We will animate and include different graphics and pictures to make the project more engaging with the user. We will use functions with the keys and mouse to interact with the code. Although we want the user to enjoy the game, we want them to take it seriously since it is a real issue, so we plan to use simple but sophisticated colors and physical attributed to make it seem more polished. In our display, we will use digital fabrication, both 3D printing, and laser-cutting, to make the project as appealing to the user as we can.
CONTEXT AND SIGNIFICANCE *
This project focuses on a specific issue but will be useful for a wide range of people. What we are informing people about is something commonly overlooked, and gives others that aren’t directly involved a closer look at what really goes on. We will ask about what the user thinks makes it likely for a person to commit a crime based on family history, personalities, and physical attributes. When the quiz and other activities are completed, we will inform them of the misconceptions they hold of criminals, the criminal justice system, and how to recognize these traits. We will show statistics of what people commonly think about a certain topic versus what the real statistics are. The end goal of the game will be to have people rethink their assumptions about criminals and be more interested in helping to improve the system.
works cited
https://www.themarshallproject.org/ ~ a “Nonprofit journal about criminal justice”
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 previousX;
int previousY;
void setup() {
size(500, 500);
background(0);
setupSerial();
}
void draw() {
updateSerial();
printArray(sensorValues);
color(255);
stroke(255);
strokeWeight(10);
//line( sensorValues[0], sensorValues[1], 50,50);
line( previousX, previousY, sensorValues[0], sensorValues[1]);
previousX = sensorValues[0];
previousY = sensorValues[1];
}
void setupSerial() {
printArray(Serial.list());
myPort = new Serial(this, Serial.list()[ 2 ], 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]);
}
}
}
}
}
When making the Etch-a-sketch I spent the entire recitation period, a lot more time on it than anticipated. After adding the map function it got a lot easier, but I spent so long trying to figure out what was wrong. I realized at the end that the commas were what was keeping everything from running the right way. I think the user is almost completely in control of the etch-a-sketch which gives it a high level of interactivity. It is engaging and the output depends solely on the user.
Exercise 2: Make a musical instrument with Arduino
This one was a bit harder for me even though I didn’t think it would be. The start was very similar to the first exercise and used tones like my midterm project. I think that it is also pretty interactive, but I think that the etch a sketch is better because the user can make something that they made at the end. This does too if you’re thinking about the other senses. It brings up the ides of combining the two to use numerous senses to make the best experience for the user.