As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Wednesday, April 27, 2011

Inness and Neil R: Week 5 Pseudo Code

We’ve been getting down to the nitty-gritty of how to build the components of our pitcher this week, and have found that the most essential part of our design is also the most complex. Our concept hinges on the ability to A) transmit audio wirelessly from microphones to a receiver and play at a high enough quality that words can be discerned, and B) have the receiver switch between different microphone channels. To solve for the first essential need of our design we’ve purchased a baby monitor from Goodwill. Because of the important function of a baby monitor this device has a high enough quality to suit our purposes. It also has four channels, so that theoretically we could set up microphones transmitting on each of those channels and have them all be picked up by the receiver portion of the monitor. It’s in the channel switching that things become complicated. The switch is a complex mechanical slide, so because we don’t want to build automated mechanical parts to move the switch, our plan is to break the switch and sodder each frequency to a different wire. Each wire would be linked to its own transistor, with their gates linked to arduino pins that would alternately be programmed with one HIGH and the others LOW depending on the pitcher’s orientation. However, before we more onto installing a compass our goal os to figure out this audio transmission portion of the device, and incorporate a tilt sensor to initiate a ten second audio feed.

After thinking through the approach we were going to take in building the audio transmitting pitcher, we conceptualized how our program might look. What we would need the code to do is set a variable based on the angle of the pitcher and then activate a predetermined receiving frequency. If a tilt sensor is activated, then we want to turn the volume or power to the receiver on, and allow it to play for 10 seconds before turning off, staying dormant for a minute afterwards.


pseudo code:


if liquid is greater than minimum threshold, turn on


find directional angle of pitcher based on degrees from directional sensor


if angle of pitcher is >=0 and <90

{

then match pitcher receiving frequency to frequency A

}


if angle of pitcher is >=90 and <180

{

then match pitcher receiving frequency to frequency B

}


if angle of pitcher is >=180 and <270

{

then match pitcher receiving frequency to frequency C

}


if angle of pitcher is >=270 and <360/ 0

{

then match pitcher receiving frequency to frequency D

}


if pitcher tilt sensor is activated

{

then activate pitcher walkie talkie receiver to on state, and play sound from corresponding frequency transmitter (A,B,C, or D)


delay for 10 seconds


end pitcher transmission


delay 1 minute

}


if liquid level is less than minimum threshold, turn off

No comments:

Post a Comment