Category Archives: Your work

Final Project – Big Brother Time!

Had a great time in the class. It was great meeting each of you and getting the change to learn something new!

My project uses a FSR to manage the color of a box on a grid that correspond to the day and hour of the week. There is a check periodically through each hour, and when there is pressure when checked, it moves the color of the box from white to black gradually. Scott got me going on the hour and day portion which was really helpful.



Processing code:

import processing.serial.*; // import the serial library
import java.util.Date; // import the java date library

Serial mySerial; // an instance of the serial class

int thisBox = 255; // the variable that describes the box color

int prevHour; // a variable to hold the previous hour
// use this to check for a change in the hour
// and reset the color variable

int xPos =0; // a variable for the xPosition of a box (if you want to go that route)
int yPos =0; // a variable for the yPosition of a box (if you want to go that route)

void setup() {
size(700, 600); // a larger window so that it’s more legible
println(Serial.list()); // list our serial ports

String portName = Serial.list()[1]; // get the port name
// open the serial port at 9600 baud
mySerial = new Serial(this, portName, 9600);
// when we receive anewline char, trigger the serialEvent fxn

// white background

// draw a grid in black
for (int i = 0; i<700; i=i+100) {
for (int j = 0; j<1200; j=j+25) { // CD- back to 800
rect(i, j, 100, 25);

void draw() {
// variables to hold the hour and day of the week
int hour = hour(); /// 24 hour clock 9 10 11 12 13 14 15 16 17 18 etc….
int day=new Date().getDay(); //0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturda

// if the hour has changed
if (hour !=prevHour) {
thisBox=255; // make the new fill color white
prevHour=hour; // set the previous hour to this hour

fill(thisBox); // fill color for the box you’re currently writing to

// you can set this up to change a variable for the box x,y position
// so that if day == 1, xPos = 0. if day==2, xPos=100 (etc).
// and for the hours if hour ==9, yPos=0. if hour=10, yPos =100 (etc.)

if (hour == 1) { // if 9am CD-back to 9
yPos =0;
} else if (hour==2) { // if 10 am
} else if (hour==3) { // if 10 am
} else if (hour==4) { // if 10 am
} else if (hour==5) { // if 10 am
} else if (hour==6) { // if 10 am
} else if (hour==7) { // if 10 am
} else if (hour==8) { // if 10 am
} else if (hour==9) { // if 10 am
} else if (hour==10) { // if 10 am
} else if (hour==11) { // if 10 am
} else if (hour==12) { // if 10 am
} else if (hour==13) { // if 10 am
} else if (hour==14) { // if 10 am
} else if (hour==15) { // if 10 am
} else if (hour==16) { // if 10 am
} else if (hour==17) { // if 10 am
} else if (hour==18) { // if 10 am
} else if (hour==19) { // if 10 am
} else if (hour==20) { // if 10 am
} else if (hour==21) { // if 10 am
} else if (hour==22) { // if 10 am
} else if (hour==23) { // if 10 am
} else if (hour == 0) { // if 9am CD-back to 9
yPos =575;

if (day == 1) { // if Monday
xPos =0;
} else if (day ==2) { // if Tuesday
xPos =100;
} else if (day ==3) { // if Tuesday
xPos =200;
} else if (day ==4) { // if Tuesday
xPos =300;
} else if (day ==5) { // if Tuesday
xPos =400;
} else if (day ==6) { // if Tuesday
xPos =500;
} else if (day ==0) { // if Tuesday
xPos =600;
} /// continue for the other days of the week thru Fri

// draw the box
rect(xPos, yPos, 100, 25);
// serialEvent only fires when a message is received from the Arduino
// in this case it’s only once a minute (because that’s how often the
// Arduino fires
void serialEvent(Serial port) {
if (port == null) return; // make sure there’s information

String inString = port.readStringUntil(‘\n’); // read until the newline character

if (inString != null) { // as long as there’s an actual word in there
inString = trim(inString); // trim off any whitespace:
String check = “working”;
if (inString.equals(check)) { // if the arduino sent working”
thisBox = thisBox-25; // make the color for the box a little darker
// 4*60=240, which would be pretty close to black if someone is in the chair the full hour
} else {
// nothing to do if someone’s not working


Arduino code

int fsrVal; // variable to hold the senspr value

void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // start serial communication

void loop() {
// put your main code here, to run repeatedly:
fsrVal = analogRead(A0); // read the sensor, save in variable

if (fsrVal < 999) { // if the sensor value is less than 999
Serial.println(“working”); // send a “working” message
} else if (fsrVal >= 1000) { // if it’s greater or equal to 1000
Serial.println(“notWorking”); // send the “not working” message
delay(600); // wait one minute before the next read


Prismatic Box

When I started this project, I wanted to make a controller that could manipulate an image in Processing.  The design of this controller would be similar to this one from HitBox, but with slightly different button positions:


I bought 12 buttons from Video Games New York and took a sturdy cardboard box from my apartment.  Here’s a stock image of the Light Blue buttons:

From there, I brought my materials to the ITP 4th Floor to get wires, solder, and various tools.  I measured the size of the buttons to determine the size of the holes I would need to cut into the box.  Once the measurements were complete, I slid the buttons in.

Box with Buttons

Next came the wiring.  I’ve actually never used solder before this project, but I learned very quickly with a little help.  I started by soldering the wires from the 4th floor to the buttons on one side and the Arduino cables on the other.  I was only able to wire half of the buttons before Tuesday’s class since I also wanted to work on the Processing program.

Wires for Six

The initial thought was for Processing was to display what button is being pressed.  However I thought this would be boring, so I tried to make something more exciting.  Since this controller design is intended for video games, I decided to make a circle that would move around based on button presses.  However, it became difficult for me to implement animations in a way that I wanted.

As exciting as this would have been, I came to the realization that the important part of my project was the hardware.  Still, I didn’t want to just show button presses in Processing.

First DemoWhile showing my progress in class, Drew suggested that I should have the colors of the buttons on my controller blend in Processing.  I really liked this idea because it was simpler than the animated circle, but more exciting than the basic buttons.  I decided that blending colors would be the basis of my new program.

The next day, I got back to wiring.  I had to secure some of the original solder joints with heat shrink wraps.  After that I soldered the rest of the wires to the other six buttons.  Then figured out how properly attach my buttons to the breadboard in circuit.  I also decided that didn’t need the white buttons anymore because they were having trouble staying in the breadboard.  On top of that, I didn’t want to use that color in my new Processing program.

Wires in Breadboard

Once everything was wired, I programmed the Arduino to communicate with my computer.  Here’s the code for that:

Now the only thing left was the program in Processing.  I decided to alter the “ArrayBallsAddSubtract” code from class to allow for Arduino input.  I also changed numerous parameters including as the colors, sizes, and opacity of the balls.  You’ll find my code and a video demo below:



I learned so much over the course of this project between hardware design, soldering, and programming.  But if there’s one thing I learned this week that trumps everything else, it was to know my limits.

I’m the type of person who has grand elaborate ideas.  These ideas are great in theory, but practically I don’t always have the skills, knowledge, or time to complete them.  Eventually, I get so fixated on these ideas that I become frustrated when I can’t finish them.  But during this project I was able to change course when I noticed things weren’t working, specifically with Processing.

Despite being disappointed in this change originally, I realized that I had already created something I was really proud of.  I’ve wanted to make a controller like this for over a year, and the fact that I was able to do so is amazing to me.  On top of that, I was still able to program software to demonstrate this controller.  Sure, it wasn’t the software I originally had in mind, but it’s something I was within my abilities.

At the end of the day (or week as it may be), I’m ecstatic that I was able to develop something I’ve thought about for a long time.  But more importantly, I’m happy that I could surpass the such a big creative obstacle: myself.

Sam & Anna’s Final Project Progress

fsr and bouncing bubbles

I was having serious issues with hooking the fsr up to processing. This was meant to be a “are you ready?!” kind of sensor. So, that the moment the user holds/presses the sensor the game begins (just because physical sensors are more fun than regular keys). But, I sort of failed because the game was just laggy without fsr reading but flowed nicely with fsr reading.


Let the Bubbles Hit the Floor ~

Hey Y’all Below is the Code for both Arduino and Process for a Simple Button that spawns a bubble while the wiper from the motor dictates the speed/direction the bubble is flung against the imaginary walls.

Please Feel Free to Ask Any Questions!




What Computing Means to Mike

“With great power, comes great responsibility”

Ever since the first Spider-Man movie came out, this phrase has been repeated over, and over, and OVER again. People may be tired of hearing it, but it describes exactly how I feel about computing.

The speed at which modern technology works is staggering. Millions of bits and bytes transferred within seconds, the ability to multi-task with numerous applications, virtual reality, and the entire Internet in the palm of our hand. College students can even build a global business from their dorm room, something absolutely unheard of fifteen years ago. Humanity has so many possibilities at our fingertips, and I absolutely love it!

Having said that, we really have to be careful with all this power. And no, I’m not saying we’ll make Terminators from this technology or the Google Drones will turn on humans. What saying is that this technology can be so immersive that we often lose sight of other important things in life.

For example, programming an entire website may be enjoyable, but it can be lonely to sit in a room all day doing that. Virtual reality, on the other hand, allows us to explore brand new worlds while completely ignoring what’s “outside of the box”. But when we leave the box, we find that other people have been exploring the world we live in. They’ve been socializing, making friendships, and interacting in the very ways that make us human. Forgetting to do this can make the real world extremely difficult place to live in.

Sorry for the slightly depressing post guys, but I hope you understand where I’m coming from. I’m not saying we should stop Apple from selling computers or shut down the Internet. However, I think it’s important to take a break from these things every once in while so we can truly experience all that life has to offer.

What computing means{does} to Sam~

Since spring semester of 2015, my understanding of computing has drastically changed. Less than a year ago, I’d look at any type of code and think “I have absolutely *no* idea what any of this means”. It’s a strange thing now that I enjoy hacking (or attempting to anyway) my way through Processing and Arduino sketches and C# scripts. And, in a couple of months, I’ll be learning more languages. Studying code is truly eyeopening and I’ve grown a passion for creating games, applications, and experiences. One of the main reasons I’ve become so fond of creative coding is because we, as creators, have the opportunity to influence and impact people’s lives.

I experienced this in particular when I demoed my first VR (virtual reality) game in Shanghai earlier this year in May. For three hours, I stood there (fortunately enough) witnessing people’s first time experiences in VR! (And they were playing something I made *wHat?*). I’ll never forget the expressions on peoples faces, some of the words coming out of their mouths, and the strangely unexpected results from user testing my stuff with several people. That’s where I also noticed the significance of design and functionality and the *importance* of expecting the unexpected (aka the user you’d never be). So, at this point – after I have gained a better understanding of Arduino and its ability to prototype any cool ideas one may have – I am crowded with thoughts of what I’m going to do next. A custom made controller for the virtual world? A 2d human bubble catcher game? An interactive piece of clothing or accessory? An nicely designed but fully functional interactive safety mechanism? New media — ah, the exponential evolution of tech. I don’t see why we shouldn’t immerse ourselves…which reminds me of this comedian I saw the other week. She went on and on about how everyone thinks that robots are going to *take over the world* and adding on to that by saying then *don’t create* them. And, though she was kind of funny, I found myself cringing a little bit because discouraging creativity (and especially within the tech world) is a big *wtf are you saying that?* in my world.

The growing interactivity of things allows us to connect in ways we could’ve never imagined before. And the opportunity we have to evolve the ever-changing softwares…forever. I want to adapt coding as a native language, and I want to create as much as I can in an equal amount of mind-boggling and straight forward real and virtual things.

And, now I’m done~

Sam’s Game

So I had some issues implementing the “changeSpeed” aspect, as it wouldn’t changeSpeed continuously for some reason. Other than that, it was fairly simple to make this game. To make the game more fun, I’d like to add some obstacles that pop up every now and then. But, that’ll take me a bit more time to figure out…


Awesome code & Sam’s trial & error(s)

Hi everyone!

I found some awesome demos while trying to figure out what I could do for my assignment. I miserably tried to manipulate code for hours…thinking I could simply look at a flocking code and other notes and synthesize a predator from which the boids would flee from. But, a challenge it was and a challenge it has remained. View a screen capture of everything here.

Here are some awesome demos:

Particles with Attraction and Repulsion Forces

Flocking with predators

I managed to integrate my ball into the flocking code found on processing (see below), but I couldn’t figure out how to code such that the flock would flee from the ball as well. So, I just pretended that this was a game and the user’s purpose was to avoid the flock with the mouse.

Ideally, one would create another function that tells the flock to avoid the x and y position of the ball (plus its diameter I assume) at any times.

Furthermore, I changed the class’s original multi-ball animation script by adding some color coding (see below). I just wrote another function and incorporated it.

Self Portrait (With a Nice Soundtrack!)


Hey guys!

I hope you enjoy this video of me drawing myself…  quite terribly, I might add.  I’m not the best at drawing and apparently I can overlook filling in the skin on my face.  But I’m still VERY proud of the program and the music choice from Mario Paint.  It seemed fitting!

Additionally, here’s my code for this program: