Wednesday, May 15, 2013

Final Project!!!

SNAKE CHARMER


For my final project, I remade the retro arcade game snake in processing. The idea is simple, you move a snake around with a controller, and when you eat the white dots, the snake grows. You lose the game if you go out of the screen or run into yourself. In addition to making it look fantastic, I added a retro game controller using my Arduino. I originally planned to use foot-pedals to control the snake in a DDR fashion, however the foot pedals that I bought did not work for this project so I built the controller instead. The controller consists of four pushbuttons controlling the direction of the snake, and the entire thing is big enough to store the Arduino in and is thus self contained.  The part of the project I am most proud of is the movement of the snake, which I managed to make fluid. I did this by making each body member of the snake an object and averaging the x and y position of each object with the object in front of it each time the draw loop executed. The color of the snake is random but also gradual. Each new body object's color changes in a small but random amount when added to the snake, making the snake look beautiful.



Video 1: General Gameplay

Video 2: Toggling between circle and square view. (just for looks)

Opening Credits

Pause Screen

Game Over Screen

Inside the game controller




Thanks for a great semester! - Noah

Monday, April 29, 2013

Final Project - SnakeCharmer - Week 1

SnakeCharmer


For my final product, I will combine two classic videogames to create a new game with an interesting user experience. I will combine the retro arcade game "Snake" with the more modern dancing game "Dance Dance Revolution (DDR)" to create a truly unique interaction. 



The snake's movement will be controlled with the DDR pad instead of a keyboard. I will emulate a DDR pad (as shown above) with 4 foot pedals that I am buying from sparkfun. I will create the actual snake game in processing. 

•The intended audience is everyone!
•The project will not technically satisfy an existing need. It is intended to be fun. 
•The only parts I need besides the basic Arduino stuff is the foot pedals, which are pretty cheep. 
•I will be using Arduino and Processing.
•I have no electronics background outside of this class, and have taken the first two introductory programming classes at NYU.



Thanks!








Data Visualization Experiment #3

For experiment #3, I decided to visualize time. My timer grows every second and resets every ten seconds.

Data Visualization Experiment #2

New York City murder rates compared to Detroit murder rates for the last 13 years. Visualized in an overlapping bar-graph in processing.

Data Visualization Experiment #1

New York City Murder Rates for the last 13 years visualized in a bar graph in processing.

Monday, April 1, 2013

Cryptech Demonstration








The following videos show the final version of Cryptech (for now). The first video shows all the hardware, and the actions taken to unlock the safe (if you have the key and know the dial location). The second video shows an closeup of the servo motor while it unlocks and locks again.

Cryptech Questionaire


§  Introduce members of the team
§  Name – Noah X. Deutsch
§  Major and any special interests – I am a freshman at Gallatin, studying computer science and philosophy.
§  What background in electronics or programming you each have – My programming background is just the introductory courses in python and java. I had no electronics background before this class besides what I learned in high school physics.
§  Project Summary
§  Title – Cryptech 
§  Short pitch – for my project, I designed a small safe that required multiple inputs to open. The safe reads these various inputs, determines if these inputs meet the required conditions, and then unlocks the safe if they do (technical details in Hardware).
§  Does this fill a need? - Designing a safe that is fun and secure may not fill a need, but it certainly fills a desire. Many everyday items that we interact with have long strangers to inovation, and this often leads to a boring interaction between the user and the object. I wanted to redefine the safe because it is something that has for too long remained the same, and a fun yet secure safe is a product that I would buy.
§  Does this mediate or add to an existing behavior? - Cryptech adds to the behavior of opening a safe, but makes it more interesting and fun. 
§  Is this a project you intended to be more than just a class project?  - While my project is intended for class, I also made it for myself so that I would be building something that I would want to keep. The next step for me is making it secure and adding more fun components!
§  The target audience
§  Who are you making this for? - The safe is designed for anybody who would want a secure, yet fun way to interact with an everyday object like a safe. In particular, this product could be marketed to any homeowner.
§  What tendencies and/or limitations does this audience have that you took into consideration when designing your project? - The limitations to this audience are small, for it is applicable to must adults. Any homeowner could desire a product like this.
§  Did you do any user observation on your target audience when designing this project? - Since I am technically part of my target audience, you could say I observed myself when designing this product. Otherwise, not really.
§  Did you test your project with your intended audience? -  I tested the safe with my friends, just to make sure that they couldn’t open it (without using force). Even with the key, they failed every time. 
§  If yes, what did you learn - I learned that it was pretty hard for an outsider to open Cryptech without using force, which was good news! 
§  The technical system
§  What hardware did you use? - For the input used to unlock the solenoid motor, a number of things were used. A potentiometer was hooked up to an analog input pin, and this potentiometer acted as the dial for the safe. Two buttons were used for the final act of opening the safe, one of them being a retro arcade button. A key and lock attachment that I purchased from Sparkfun was also used as a final way to ensure the security of the safe. The output was far simpler, and consisted only of a solenoid and a green led. When all the conditions were met for the input, a transistor would "open", the solenoid would “unlock”, and the green led would turn on, symbolizing that the safe was ready to be opened.

For the actual safe, I used a small box which I purchased from home depot. The locking hook I built my self out of a hanger and electrical tape, and this was the hardest part of the hardware for me to create. It was surprisingly challenging to build a hook that was rigid enough that it would lock every time you closed the box, yet flexible enough that I could manually open it if I needed to. 

§  What software did you use? The only software used was the Arduino software. The code essentially consisted of a series of nested if-statements: If this input is on, and this input is on, and the dial is turned to this value.....then unlock the safe and turn on the light. 
§  Did you use any Arduino or Processing libraries? I did not.
§  Any new types of circuits or electronic components you had to learn to use? I had to brush up on my transistor knowhow, but otherwise no.
§  What aspect of developing the project took the most time? – Building hook for the locking mechanism definitely took the most time. I did not anticipate this to be a problem at the beginning, and had to go through 5 prototypes until I made a hook that locked every time I closed the safe but that I could still manually override.  
§  Problems
§  What difficulties did you expect to have when you first started, and did they occur? I expected my most difficulties to be building the actual safe. These difficulties occurred  but almost exclusively in the hook/locking mechanism. 
§  What did you struggle the most in this project? I had a lot of problems with breaking equipment. I originally bought a hall effect sensor, that would create a new condition required to open the safe. You would have to use a magnet as a key to unlock the safe. However, this sensor broke during the final stages of testing and it was too late to order a new one. I also fried my super-bright red led and broke a transistor in the late stages of building the safe.
§  How did you overcome these problems?Or why didn’t you, if you didn’t? - These problems were not completely essential to the project as a whole. However, I think losing them (particularly the broken hall effect sensor) did detract from the "magic" and appeal of the safe. In the near future, I am going to repurchase these items and implement them, taking special care not to damage them!
§  Lessons learned
§  Was this project more or less work than you imagined at the beginning? It was about the same amount of work as I imagined it would be.
§  Did you have to learn any new software or hardware techniques to make this? I didn’t have to learn any new software techniques, but I had to be very resourceful when building the actual locking mechanism
§  Did you learn anything interesting from working on this project? I learned a lot from this project. Mainly, I learned that you have to allocate a lot of time for unexpected problems when working on large projects. I also learned that I need to take very good care of my components or they will break. In addition, I learned that I absolutely need to learn how to solder!
§  The future
§  Do you think this project has a use outside of class? This project has a use outside of class (for me at least). I intend to work on the project until it is secure, and then use it as my personal safe!

§  Do you intend to continue working on this? As I said above, I do intend to continue working on the safe, making it more fun with interesting sensors (including the hall effect sensor, which I initially intended to use). Sparkfun sells a biometric fingerprint scanner that I think would make an excellent addition to this project. I would also like to add a couple more lights and maybe some sound to Cryptech.