Wednesday, September 26, 2007

Shiver - Early Development

I have decided to go ahead and start dedicating a good amount of time toward one of the two major projects I hope to accomplish this semester at ITP. The project name is tentatively called "Shiver" and it involves parsing seismic event data and using that content as a way of provoking both visual and physical simulations. Right now, I am concentrating on the visual side - as it is a nice starting place to begin prototyping the "how" as it relates to progress I will need to make later in development. However, one of the major tasks I wanted to immediately address was the ability to interface hardware I create with the software I am programming. I was able to get an analog signal to influence variables inside Processing using its serial library - with the pictures and code below:



Fig 1.1: Simple circuit hooked up to a Arduino and variable resister
to test analog/serial communication.




Fig 1.2: Still image of Shiver at current development point


Link:
Main Demonstration Page

Processing - Source code:
parse_blocks
xml_parser

Arduino - Source code:
serial_communication

Saturday, September 22, 2007

Motion Tracking Glove Prototype

In my first attempt in pairing concepts from my Physical Computing and Computational Media classes - I decided that I would like to try my hand (pun fully intended) at developing a type of glove-based motion tracking system. Since I have a larger project in mind for Computational Media which involves tracking movement through a camera - this was a perfect opportunity to start roughing out a few of the pixel tracking / blob detection algorithms that would be easily reusable when I move on to developing the larger project. So, after an afternoon of traversing through pixels, I had the color tracker working on high densities of near-pure red:


Fig 1.1: Ellipse following over pixels being tracked


So, with the tracking algorithms working well enough to run some practical tests - it was then time to move into the physical computing side of my endeavor. The wiring was a rather simple affair, as I really only intended to have two LEDs, one which was to be consistently on and the other to require a button press to light up. After a successful test with my Arduino code - I cut up some cardboard and wrapped two pieces of equal length in eletrical tape, then sandwiched my board into an enclosure, as seen below:


Fig 1.2: An ugly yet effective circuit board enclosure



Fig 1.3: The enclosure opened - revealing the breadboard and
microprocessor.


I had bought some gloves from K-Mart that were of the variety where if you flip down a flap the gloves could become mittens. The flap turned out the be the (near) perfect holder for my enclosure. The fit isn't exact - but just fine for the prototypical nature of this project. A few holes through fabric and some snaking of the wire through the palm and fingers of the glove and it was ready for action.


Fig 1.4: Motion tracking glove - ready for your local fashion show.



Fig 1.5: Glove plugged into a USB port and working

After putting on the glove and using it in combination with the Processing program I wrote, the test results indicate that better lit rooms gives the color tracking algorithms a bit too many high values than it can currently handle - which results in flickering of the tracking point. However, in moderate to low lit rooms - the glove works rather well. Below is the screen shot of the glove in action with the Processing program:


Fig 1.6: Motion/Color tracking algorithms paired with Processing graphics, pointer
being directed by glove use.



Processing - Source code:
motion_tracker
blinds
gui_components

Arduino - Source code:
motion_glove

Physical Computer - Lab #2

Moving forward in the adventures of the electrical nature - it was already time to dive into the programming side of physical computing. Lab #2 consisted of wiring up a simple circuit with a switch and a couple of LEDs and being able to program a Arduino board to process simple logic through authored code. After working through the previous lab - I found the circuit-boarding side of this lab to be far easier, even with the addition of the Arduino microprocessor, which as the time was completely foreign to me. Below are a couple of pictures of the process, plus a link to the source code for my first Arduino program.



Fig 1.1: First success using Arduino


Fig 1.2: Using a simple switch logic gate


Fig 1.3: Six LEDs blinking one after another


Source Code: six_led_lights


Note: I have noticed that one of the (many) limitations of the programming language initially available to use with the Ardunio microprocessor is the inability to directly get the size of an array through a method or any sort of standalone function. This becomes problematic when needing to accurately loop through an array of LED pins, or anything else stored in an array for that matter. A way around this limitation without resorting to counting the elements manually and hard-coding that number to a variable is to instead use the following code, as additionally outlined in my source code.

int led_pins[] = {3,4,5,6,7,8};
int led_pin_count = sizeof(led_pins) / 2;


The global function 'sizeof' returns a value which represents the number of bytes currently stored in a given variable. Since we can assume that an integer is 2 bytes; dividing the value sizeof returns by 2 will result in the elemental size of our array.

Wednesday, September 19, 2007

Physical Interface: Cash Register

In all likelihood - I have walked more in these past couple of weeks than I had in any given week during my time as an undergrad. I am fortunate enough to live within walking distance (roughly 1.8 miles) to the Interactive Telecommunications Department where I am undertaking my graduate research at NYU. More often than not - I drop into a local deli on my way to ITP to grab a vitamin water or perhaps one of those energy bars of varying brand. Upon selecting what is likely going to turn out to be lunch - I walk over to the cashier to pay my usual $4.00 in cash, a much more 'pleasant' affair now after being glared at several times for sticking out a credit card. Besides the usual stiff attitude of the deli cashiers, I have always been taken by the speed of which the cashiers operate. Usually, the cash register itself is of the older variety - a 'do it yourself' style machine where numbers of prices are punched in rather than scanned. What is most interesting is that in my experience, the old-style cash registers are substantially faster and the users seem far less likely to have a "someone get the manager over here" type moment compared to a scan-based register with touch screens. So, is this an instance of technology getting in the way rather than helping? Here is my completely research-free and high-level look:

First, there needs to be an acceptance to the fact that technology isn't always built for speed. Be it for all the right or wrong reasons - technology many times can substitute what was traditionally a simple and fast process with more functionality; resulting in a steeper learning curve for the end-user(s). I have chosen cash registers as an example for a user-interface to analyze because its advancement in features are an interesting mix of positives and negatives, as well as a device that has taken on a new relationship with its users. The cash register has 'evolved' from a interface requiring one employee to use the device, to needing an employee and a customer to interact with, to most recently - only needing a customer to interact with, now coming full-circle. I won't focus on the third advancement, but I want to write a quick comparison of the first two user-interfaces - the singular and dual user interface cash registers.


Fig 1.1: Older model cash register: simple and fast
(Stoic NYC cashier attendant not pictured)


In my example of the dual-user register - I recently went to a Best Buy in lower Manhattan to buy a DVD (The Office: Season 3... a must have) and approached the cashier in front of a rather new looking cash register system, complete with a customer input pad and stylus pen for a signature. In the end, this transaction took several times longer than an average transaction at the deli - with the very same amount of items using the exact same type of payment: a credit card (to the chagrin of the deli cashier). Generally with technology, if a user is being asked to allocate more time, then the end result is expected to be enhanced to return. My end result as a customer yielded no instant enhancements - I still received a receipt, my item, and a debit from my banking account in both transactions. As a user-interface, the technologically enabled cash register at Best Buy required effort on my part by signing with the stylus (awkwardly, as always) and paying attention to which buttons to press to proceed. The cashier seemingly did less work in relation to number of button-presses and analysis than that of the deli cashier - but the overall workload wasn't necessarily shortened, only abstracted across multiple users (such as myself) and varying interfaces. Sure, there are a few hidden benefits of the high-end register such as receipt caching for faster returns and cash back options using a debit card - but what is the ratio between transactions and the collective number of returns and debit card cash back requested on a given day? I'd say it is very likely a substantially lopsided ratio leaning toward the quantity of transactions - yet the technological advances cater to the lower frequency of occurrences in the case of the cash register.


Fig 1.2: "Sign here and press button to continue, now
press this combination of buttons to confirm...hey,
pay attention or this transaction isn't happening."

My concluding thought is that you could make the case that technology advancement for the cash register earns its keep because it lessens the work load of the cashier - but then again, the cashier is getting paid to work less at the expense of my time, so as a customer I wouldn't exactly call that a positive step unless I was on the other side of the register.

Monday, September 17, 2007

ICM - Assignment 2: Mouse Tracker

This is just a quick demonstration of how shapes can change states based on mouse interaction - and continue animation after the interaction has taken place. This example (which I cannot embed in this blog because of its large size) is just the simplistic animation mouse tracking part of a larger project I am undertaking which involves using a connected camera to track movements of a certain color, then using that concentration of color as a pointer. More on this project later...



Mouse Tracker using Processing / Java

Tuesday, September 11, 2007

Physical Computing - Lab #1

So, this is lab was my first venture into the depths of physical computing. I feel that overall, things went rather smoothly - escaping without any serious injuries or damage to private property. For my efforts - I was able to make multiple LEDs of various colors light up, as well as garnering the ability to fade them in and out and using a switch to turn them on and off. Perhaps not too exciting to read about - but certainly exciting to accomplish on my end.



My first circuit.


Switch Activated LED



Fading LED using a potentiometer.


This lab served as a great introduction to some of the really core basics/principles of electrical engineering. I am looking forward to start programming microprocessors - especially when it comes pairing code logic with sensors. More to come.

Friday, September 7, 2007

ICM - Assignment 1: Circle Creator

I wrote up a little applet in Processing which simply creates circles of varying sizes at pseudo-random coordinates within a bounding box.

For this assignment, I wanted to use the time I had to write up a couple of class objects I knew that I could reuse later on in this class (and just in general) - in particular a general use button and a border frame. Clicking the button signals a callback of sorts to the main circle drawing function - pretty straight forward, although not being able to pass a function as an argument to another function makes it less flexible currently than I'd like.


































This browser does not have a Java Plug-in.



Get the latest Java Plug-in here.









Handle Events:
Mouse click (within viewport box): erase viewport
Key 'r': Red scale
Key 'g': Green scale
Key 'b': Blue scale

Source code: circle_creator

Built with Processing