Tuesday, December 5, 2006

Circuit 3 - Button + LED

I thought this circuit was pretty neat because it provided us with a certain amount of control. Humans like to control things, and it was pretty satisfying to be able to open and close the circuit to turn my little LED on and off at the click of a button. This simple technique will surely come in handy in this course in the future, especially in any sort of interactive installation where we may want the participants to have control over something. As far as the technicality goes, I didn't seem to have any trouble putting this one together.


Code:

' {$STAMP BS2sx}
' {$PBASIC 2.5}


' control an LED switch a switch
' using an IF..THEN structure


' ****** variables ************

mySwitch VAR BIT ' looking at a switch so only a BIT is required

' ****** setup ********

myLed CON 1 ' connect a digital out to this PIN

' **** processing ************

DO
'read the state of switch
mySwitch = IN0
DEBUG ? mySwitch

' write state of switch to myLED
IF mySwitch = 0 THEN
LOW myLed
ELSE
HIGH myLed
ENDIF

LOOP

Photos:





Video:



Resource: here.

Saturday, December 2, 2006

Circuit 2 - Speaker

Well one thing is for sure, I can't stand the sound that this makes, it drives me absolutely insane, but by playing with the capacitors and resistors I have managed to make it beep rather than let off one long obnoxious screech. It is undoubtedly a joyous moment when the speaker first makes a sound (just as it was when my LED lit up for the first time), but when you have a whole classroom full of screeching speakers... it's not exactly the most pleasant thing in the world! It was cool though, and I found it really interesting how you could do different things to control the sound, hook up a switch to change the pitch, and so on. It will also be interesting to see where we can take this next semester. When building this circuit, I had some minor problems controlling the sound in the beginning, it was pretty unpleasant, but with some help from Norm they were not particularly hard to solve.

Photos:






Video:



Resource: here.

Wednesday, November 29, 2006

Circuit 1 - Motion Sensor

Out of all of the circuits and techniques we've learned thus far in this course, I feel that this one has the most potential and room for creativity. The possibilities are endless with regards to the things that you can do with motion activity. Whether it be turning a light on or off, activating sound or video, or making something move, this is one of the most basic and preliminary techniques that you could use within a New Media installation. I look forward to next semester when we are able to put this basic function to further use. I couldn't figure out why I was unable to get this circuit to work in the beginning, but I soon discovered that I had to ground the sensor, which solved all my problems.


Code:

' {$STAMP BS2sx}
' {$PBASIC 2.5}


' control an LED switch a switch
' using an IF..THEN structure


' ****** variables ************

mySwitch VAR BIT ' looking at a switch so only a BIT is required

' ****** setup ********

myLed CON 1 ' connect a digital out to this PIN

' **** processing ************

DO
'read the state of switch
mySwitch = IN0
DEBUG ? mySwitch

' write state of switch to myLED
IF mySwitch = 0 THEN
LOW myLed
ELSE
HIGH myLed
ENDIF

LOOP

Photos:






Video:



Resource: here.