Category Archives: Telecommunication

Hangman!

As a final revisit to our ICM class, I’ve created another game for the Telecommunications homework unlike the one-that-tried to-be-ambitious-with-rotation-but-failed. This game is a two-player Hangman (under 10 letters or less). The first player sets the word and then the second player actually guesses. And the actual communication part is to indicate loss or win by LEDS! There is also a RESET function if you lose or wish to choose another word. 

**Disclaimer: capital letters aren’t recognized and you can’t use backspace. Furthermore, when guessing a letter, “spaces” are counted as incorrect and somehow if you don’t enter anything (i.e. press “ENTER” without an actual input), it may break my game.

Choose Word

 

Loss

Win

lost win

 

 

And here is the code: 

And here is the letter class:

 Here is Arduino code:

Don’t Let Go of Nirvana

This week, I used the force sensor to link the Arduino with my enlightenment scene in Processing. Basically, when the user holds onto the force sensor, Nirvana stays on the screen. However, if the user becomes distracted and let’s go, the screen reverts to the image of Buddha trying to meditate. I like this version better because it allows the user to physically engage with the quest for Nirvana.  Continue reading Don’t Let Go of Nirvana

Piggy Bubbles (Popped by hand, wow, so cool, I’m amazing!)

So I had a busy week so I just tried to incorporate telecommunications into last weeks project. So I just used a pressure sensor and when you press the sensor it’s supposed to pop one bubble. However, I cannot get it to pop only one bubble and I keep trying to fix it but it doesn’t end up working. So in reality it’s supposed to only pop one bubble and only play that bubbles sound. I also feel that my code could be made simpler and had I had the time I’m sure I would have figured it out but like I said I was busy but whatever.

Here's a screen cap of the program running.
Here’s a screen cap of the program running.

 

KILLING THE MALAYSIAN PRIME MINISTER != GOOD

You’re Derek Zoolander and you’ve got some decisions to make.

 

Ouch!

I think this week’s assignment adequately embodies the Of Mice and Men quote: “best laid plans o’mice and men” often go awry. I had a much better idea but it really fell apart. So now I’m saving that one for a rainy day presenting a lamer substitute for this week’s assignment.

Basically, the player of the game is a (supposed to be) constantly-moving, never-tiring person who runs around the screen. The potentiometer input is supposed to dictate the angle of movement and the goal of the game is to just run around the screen, avoiding the 5 rectangle obstacles  and the edges.

The potentiometer input manages to be processed by my Processing program, but there are some other problems that I wasn’t able to fix in time.

Here’s my main code: 

Obstacles class: 

 

 

Person class:

Star class:

 

 

So the problems I’m having:

– The bounce function is ignored somehow

– The potentiometer angle isn’t processed completely as I hoped and the movement is jerky. Sometimes the person doesn’t move at all (which may be due to a mathematical computation but I’m very bewildered by this).

Back to Chasing 1D… (It works now!)

tumblr_mws0yzolrR1rx97q3o2_250

For this week’s assignment I wanted to have the arduino communicate with the crazy fan who is chasing One Direction. I changed the code to make it so that the crazy fan would not be moved by the mouse, instead she would move around randomly just like the members. My goal is to catch/freeze whichever member the fan is over by setting off the sensor. This gets into knowing when an object is on top of another which I am having trouble with. I am going to keep working with it though to try to figure something out.

 

 

UPDATE:

I fixed the code! Now they all freeze separately when the sensor is pressed!

 

 

Almost there

I’m close to something happening. Unfortunately my photo-sensor broke, so as a proxy I’ve been using a button as an input.

Every time the button is pushed, I want the expanding circle to revert back to its original size. Check da code, help me!

This Arduino code prints “1” to the serial when the button is pressed and “0” otherwise:

Processing main file:

Processing class file:

Final Maze Game with some Arduino connection

youcandoit copy

…maybe

Missing the telecommunications class was not smart on my part. Although I was in Boston, so it was a bit out of my control- I really wish I had been able to learn how to fully bridge the Arduino/Processing gap. I tried to teach myself how to exactly to do that this weekend- but it just wasn’t the same. I got each side working on their own…but the actual connection part (mainly the downloading part) I just don’t understand. Along with that, the Arduino lingo is a bit confusing too.

So…I decided to just write out the code (on both ends) of how I *think* it would work. I do understand what is going on. And I do wish I could make use of the understanding- because this section was kind of the culmination of the everything we learned this semester. For the time being, what I have figured out here will do.

Basically, I took my final maze game and replaced the keyPressed function (“q” as the restart button) and replaced it with a force sensor. Pressing the force sensor would clear the map of the “YOU LOSE” message.

Here is the code from both sides:

Processing:

and Arduino:

I wish somehow that I could control the cursor with the force sensor- though first I’ll just have to figure out how exactly to fully connect the two.

 

 

minim(al) visualization

minim(al) visual

So I was playing around with the minim library, recording voices and wondering If that’s how I really sound. My original plan was to save a recording, and play it back using the FSR, but I could only get it to work sometimes with the FilePlayer.

Instead, here’s a pretty/cool visualization of any song that plays. Personally, the visualization reminds me of Mega Man/Transformers.

To add your own song, just put the song file into the same Processing folder, and replace “Friend.mp3” with the name of the song file. To play the song, the force applied to the FSR has to be higher than 150.

 

Helicopter

Screen Shot 2014-03-29 at 7.31.15 PM

 

Here be a video

Spider Crush

heaven

For the telecommunication between the Arduino and Processing I made a simple program about killing a spider, cause there happened to be one on the wall as I began this project.

bea arthur pizza
This has nothing to do with my project, but I found a huge gallery of Bea Arthur + pizza landscapes online last night…. many potential games guys

I used the photocell sensor to represent the spider, the more you crush it, the closer the spider gets to heaven. I guess I could have used a pressure sensor as well, but the photocell was already installed and we can just make a metaphorical leap to us draining the light out of the spider’s life before he gets to go to heaven.

SORRY about the music, but I honestly couldn’t help myself.

http://youtu.be/YTQ28v2wcF0

 

Eat the Shapes Game

hello fellow earthlings

This week, I decided to continue working on the game I made during spring break. I added a force sensor through Arduino to replace the mousePressed() function, as well as some other small details for a more cohesive game.

The goal of this week’s game is to eat as many shapes as possible. To ‘eat’ an object, push the force sensor when your character (the black-outlined circle) is near a shape. A laser beam sound plays every time the force sensor is pressed.  The red number in the background shows how many shapes are currently on screen, and the large  blue number displays the number of shapes eaten. The smaller blue number in the center shows the number of shapes eaten in the previous round (kind of like a ‘high score’ record). If the red number reaches more than 25, the game is over. When a shape is eaten, one of three random sound bits plays (can you guess where I sampled from? http://www.youtube.com/watch?v=JtH68PJIQLE). Each shape comes on screen based on an independent timer. Every 10 seconds, a large black circle comes on screen. If you eat this shape, the game will automatically be over. Pressing ‘q’ resets the game.

I think I’m finally ready to label this game as ‘finished’. It’s pretty simple in gameplay, but I definitely used this project to explore how to make classes/objects, use the sound library, and connect Processing with Arduino. If I decide to come back and work on this game, I would definitely try to clean up the code so that there aren’t so many repetitive elements/the program will run faster.

goodbye fellow earthlings!

 

a better looking version of the game

 

Force Meter Set Up