Updates from February, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • Yury Gitman 11:43 pm on February 27, 2009 Permalink | Reply  

    LED time piece • v03 • PWM 

    Went minimalist for this iteration of my timepiece.  My new role for this prototype is a vertical light projection, perhaps for use in a bedroom at night.

    Red Green and Blue mix together like a colored venn-diagram displayed on the ceiling, or perhaps a wall if angled as such.  It is a relaxing effect, and i think adding PWM to the fading of each LED (which is now down to a record-low 3!) added a lot to the overall piece.

    Here is my code. I approach the for loops in 2 different ways, one by straight forward execution after an if statement, and another by creating individual functions for each LED.  Using the function method, I can pass in random numbers that are decided earlier in the code.  Overall, really sloppy, and once I choose a method I feel most appropriate, I will stick to that one.

    IMG_0458

    sweet switches

    http://vimeo.com/moogaloop.swf?clip_id=3433169&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
    LED time piece • v03 from j saavedra on Vimeo.

     
  • Yury Gitman 5:33 pm on February 27, 2009 Permalink | Reply  

    Minimum of 7 Prototypes 

    Make a minimum of 7 prototypes. 2 minimum of "Look and Feel, Role, and Implementation."

     
  • Yury Gitman 5:31 pm on February 27, 2009 Permalink | Reply  

    What do Prototypes Prototype 

    What do prototype prototype
    download Prototypes.pdf

     
  • Yury Gitman 5:31 pm on February 27, 2009 Permalink | Reply  

    Toy fair video! 

    http://vimeo.com/moogaloop.swf?clip_id=3376456&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
    int’l toy fair 2009 from j saavedra on Vimeo.

     
  • Yury Gitman 3:08 pm on February 27, 2009 Permalink | Reply  

    broken – can we talk about this? 

    int ledPins[] = { 3, 5, 6, 9, 10, 11 }; // an array of pin numbers
    int numPins = 6;
    int bigSwitch = 8;
    int onOff = 12;
    int momentary = 13;

    int onOffRead;
    int onOffState = LOW;
    int onOffPreviousState = LOW;

    int bigSwitchRead;
    int bigSwitchState = LOW;
    int bigSwitchPreviousState = LOW;

    int momentaryRead;
    int momentaryState = HIGH;
    int momentaryPreviousState = HIGH;

    void setup() {
     int i;
     for (i=0;  i<numPins; i++) {
      pinMode(ledPins[i], OUTPUT);
     }
     pinMode(onOff, INPUT);
     pinMode(bigSwitch, INPUT);
     pinMode(momentary, INPUT);

    }

    void loop() {
      
      onOffRead = digitalRead(onOff);
      if(onOffRead == HIGH) {
        
          switch (onOffState) {
              case LOW:
                onOffState = HIGH;
                break;
              case HIGH:
                onOffState = LOW;
                break;
              default:
                onOffState = LOW;
          }
      
          
         onOffPreviousState = onOffState;
         int i;
         for (i=0; i<numPins; i++) {
            digitalWrite(ledPins[i], onOffState);
         }
      }
      
      
      while (onOffState == HIGH) {
      
        momentaryRead = digitalRead(momentary);
        int i;
          if (momentaryRead == HIGH) {
           switch (momentaryState) {
             case LOW:
               momentaryState = HIGH;   
               break;
             case HIGH:
               momentaryState = LOW;
             default:
               momentaryState = LOW;
            }
      
          }
          else {
            return;
          }
         momentaryPreviousState = momentaryState;
         for (i=0; i<numPins; i++) {
            digitalWrite(ledPins[i], momentaryState);
         }
      }

        
        bigSwitchState = digitalRead(bigSwitch);
        int j;
        if (onOffRead == HIGH && bigSwitchState == HIGH) {
          for(j=255; j>0; j-=5){ 
            for (i=0; i<numPins; i++) {
               digitalWrite(ledPins[i], HIGH);
               analogWrite(ledPins[i], j);
             }
          }
          delay (100);
          }
        else {
          return;
        }

      }
        
      
      else {
        int i;
        for (i=0; i<numPins; i++) {
          digitalWrite(ledPins[i], LOW);
        }
      }
      */
    }
     
  • Yury Gitman 2:02 pm on February 27, 2009 Permalink | Reply  

    Podcast “Reading” 

    Talks  David Merrill: Siftables, the toy blocks that think
    http://www.ted.com/talks/david_merrill_demos_siftables_the_smart_blocks.html

    Talks  Caleb Chung: Come play with Pleo the dinosaur
    http://www.ted.com/index.php/talks/caleb_chung_plays_with_pleo.html

     
  • Yury Gitman 2:00 pm on February 27, 2009 Permalink | Reply  

    Ira / Still counting sheep2… 

    I find the way to make my counting sheep prototype as a more compact book. I worked mostly on the hardware part, tried to find the most efficient way to connect everything together. I just started to figure out how Arduino's programming language works, so I still need to work a lot on it. For the next prototype I will mostly concentrate on the code part, and I will try to finalize the overlook itself.

    Book2_1

    Book2_2

    Book2_3

     
  • Yury Gitman 11:25 am on February 27, 2009 Permalink | Reply  

    Myriam – Code not working 

    check here the code and help me!!:D
     
  • Yury Gitman 9:51 am on February 27, 2009 Permalink | Reply  

    Passage of time v2.5 with Switches 

    I added switches to the fourth iteration of the passage of time. 1 rocker switch for on/off, 1 toggle switch which switches between 2 patterns, 1 momentary pushbutton switch that changes the pattern when the toggle switch is up. The switches are mounted on a separate short box with holes drilled using the dremel tool and attached to the bottom of the taller box. All the switches are hooked up to the Arduino using a breadboard.

    Photo 67
    Photo 68
    Photo 69
    Photo 71
    Photo 73

    http://vimeo.com/moogaloop.swf?clip_id=3394702&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1

     
  • Yury Gitman 3:57 am on February 27, 2009 Permalink | Reply  

    Ira / Still counting sheep… 

    Still counting sheep as a time passage project, but I decided try a totally different iteration.
    I've tried to make it a book with sheep. The prototype came out a little bit to big that I wanted it to be, and doesn't really have a feeling of holding a book.
    I do like the paper patterns, it makes the blinking light more softer ( as I already did in my first iteration).
    The code is still the same one, for the next step I really need concentrate in the code and the hardware.

    Book_1
     

     
  • Yury Gitman 11:25 pm on February 26, 2009 Permalink | Reply  

    :::Switches::: 

    Picture 1

    There are a few aspects of having fun with switches that we did not cover during our lecture. For those with out experience working with switches, may not be fun at all if your switches act unpredictably or do not work at all.

    Concepts:

    1.Pull up or pull down resistor: click here to get an explanation
    2. De-bouncing

    Arduino, like other Microcontrolers, need to sense a definite high or low in their digital inputs. Both pulling up or down (in the circuit)) and de-bouncing (in the code) are ways to eliminate a false or fluctuating reading from a sensor (buttons been the simplest ones) connected to a digital input.

    1. Pull up or pull down: (in the circuit) you place a 10k resistor in between your button and 5v.
        With Pull down you  place a 10k resistor in between your button and Gnd instead. You choose, just         make sure that is either one or the other.

    Here is what your code and circuit would look like in each case:

    a)Pull up

    Notice in the circuit:

    1.One of the pins of the button is connected to the yellow wire and a resistor.

    2.The yellow wire goes to a digital in on the Arduino board (not shown here)

    3.The resistor is connected to red wire that plugs in the  5v (high) pin on the Arduino

    4. The other pin of the button is connected to the black wire which plugs in the Gnd pin on the Arduino

    :::circuit:::

    Pull_high 

    :::Code:::

    int ledPin = 13;                // choose the pin for the LED
    int inputPin = 2;               // choose the input pin (for a pushbutton)
    int val = 0;                    // variable for reading the pin status

    void setup() {
      pinMode(ledPin, OUTPUT);      // declare LED as output
      pinMode(inputPin, INPUT);     // declare pushbutton as input
    }

    void loop(){
      val = digitalRead(inputPin);  // read input value
      if (val ==  HIGH) {            //
        digitalWrite(ledPin, LOW);  // turn LED OFF
      } else {
        digitalWrite(ledPin, HIGH); // turn LED ON
      }
    }

    a)Pull down

    Notice in the circuit:

    1.One of the pins of the button is connected to the yellow wire and a resistor.

    2.The yellow wire goes to a digital in on the Arduino board (not shown here)

    3.The resistor is connected to black wire that plugs in the Gnd pin (low) on the Arduino

    4. The red wire plugs in the 5v pin on the Arduino

    Pull_down 

    :::Code:::

    int ledPin = 13;                // choose the pin for the LED
    int inputPin = 2;               // choose the input pin (for a pushbutton)
    int val = 0;                    // variable for reading the pin status

    void setup() {
      pinMode(ledPin, OUTPUT);      // declare LED as output
      pinMode(inputPin, INPUT);     // declare pushbutton as input
    }

    void loop(){
      val = digitalRead(inputPin);  // read input value
      if (val ==  LOW) {            //
        digitalWrite(ledPin, LOW);  // turn LED OFF
      } else {
        digitalWrite(ledPin, HIGH); // turn LED ON
      }
    }

    2. De-bouncing: ( in your code) In order to make sure that your button has actually been pressed, you declare variables in your code that are going to store and old (previous) and a new (current) value of the button reading. These two variables are then compared. There is a given time that you write into the code so the Arduino waits in between readings. In this example of the de-bouncing code, if the Arduino senses a fluctuation in the digital in pin (connected to your  button) that time gets increased.

    Here is the code form the Arduino site. This code also makes your push button behave like a switch by holding its state even when it is not been pressed.

    :::Code:::

    int inPin = 7; // the number of the input pin
    int outPin = 13; // the number of the output pin

    int state = HIGH; // the current state of the output pin
    int reading; // the current reading from the input pin
    int previous = LOW; // the previous reading from the input pin

    // the follow variables are long's because the time, measured in miliseconds,
    // will quickly become a bigger number than can be stored in an int.
    long time = 0; // the last time the output pin was toggled
    long debounce = 200; // the debounce time, increase if the output flickers

    void setup()
    {
    pinMode(inPin, INPUT);
    pinMode(outPin, OUTPUT);
    }

    void loop()
    {
    reading = digitalRead(inPin);

    // if we just pressed the button (i.e. the input went from LOW to HIGH),
    // and we've waited long enough since the last press to ignore any noise...
    if (reading == HIGH && previous == LOW && millis() - time > debounce) {
    // ... invert the output
    if (state == HIGH)
    state = LOW;
    else
    state = HIGH;

    // ... and remember when the last button press was
    time = millis();
    }

    digitalWrite(outPin, state);

    previous = reading;
    }

     
  • Yury Gitman 10:30 pm on February 24, 2009 Permalink | Reply  

    time gesture iteration – new prototype 

    I've shelved the cocoon prototype for the time being, in favor of a model which better accommodates the requirement for various buttons and switches. In creating this latest iteration, I dug back into a past life in which I played with molecular biology. Following cellular interactions within a biological system is an infinite source of visually intriguing time-course data, and I thought it would be an excellent point of exploration into gestures of the passage of time. A general theme in the analysis of movements and interactions in biological systems is the application of a color or fluorescent tag to the molecule in question, and then using the appropriate visualization technique to track the molecule's movements over time, say every two hours. The following is one such example of a time course examining the effect of a PPOX mutation on fluorescence distribution in the cell, showing that the mutation prevents cDNA import into the mitochondria. (RR Morgan, Identification of sequences required for the import of human protoporphyrinogen oxidase to mitochondria, Biochem. J. (2004) 377
    (281–287)
    )
    Timecourse
    I was interested in employing this type of image and time gesture in this iteration, and I began afresh with a different type of encasement, thinking that I might be able to create the effect of an old fashioned slide, such as the type used in old slide projection. I the immediate absence of such, I printed some like images on vellum paper to create a temporary prototyping tool for a similar light-diffusion effect. I also used a piece of crumpled gauze behind each image to further diffuse the quite penetrating light of the superbright LEDs.  
    IMG_4120

    This is the latest iteration, with some contrived images, including some prints of old negatives.
    IMG_4119

     
  • Yury Gitman 5:21 pm on February 24, 2009 Permalink | Reply  

    :::Reading from Code::: 

    :::Reading from CODE:::

    What
    were the specific technical issues (referring to wire and resistance)
    that prevented the early telegraph to be wired directly coast to coast?
    What solution finally worked? Illustrate how that works, allowing coast
    to coast telegraph communication.

    We
    know that the thicker the wire the more conductivity it posses.
    However, as the length of a wire increases so does the resistance. If
    follows then, that a long enough wire to go from coast to coast would
    have had too much resistance to be able to send a current to make the
    mechanism work on the other side.

    The first solution was to divide this long wire into segments and have
    a person in between the segments receiving the message and sending it
    right away to the next segment in line. Eventually the process was
    simplify and automated by the use of electrical relays. Relays are
    switches that get turn on or off by a current. In order to understand
    how relays were integrated in the telegram process we must frst
    describe how the telegram worked up to that point. When the handle was
    tapped in one side, current was sent through a wire. On the other side,
    this same wire was rapped around a piece of iron metal. When current
    runned through the coil. The coiled was electromagnetized and it pulled
    down on one side of a bar. As one side when down the other moved up and
    produced a long or short sound. A relay was connected to the incoming
    wire and everytime there was a tap on the other side, current would be
    send to the relay making the bar act as switch. This switch was
    connected to a battery and an outgoing wire. The current
    was amplify by this process and sent to the next segement of the telegram chain.

     
  • Yury Gitman 3:21 pm on February 24, 2009 Permalink | Reply  

    Student Lecture 3 

    Steve, Thai, Bruce – AnalogWrite, PWM, Fading LED’s, Multiple LED’s via PWM, Tri-Color LEDs, Cases, Switch Case, goto 

    Student Lecture 3http://static.slideshare.net/swf/ssplayer2.swf?doc=studentlecture3-090224142008-phpapp02&stripped_title=student-lecture-3

    View more presentations from bruzed.

    Multiple LED’s with PWM
    Photo 77Photo 78

    int value = 0; // variable to keep the actual value
    int pins[] = {9, 10, 11}; // light connected to digital pin 9
    int numPins = 3;
    void setup()
    {
    // nothing for setup
    }
    void loop()
    {
    int i;
    for (i=0; i < numPins; i++)
    {
    for(value = 0 ; value = 0; j–)
    {
    for(value = 255; value >=0; value-=5) // fade out (from max to min)
    {
    analogWrite(pins[j], value);
    delay(30);
    }
    }
    }



























    Tri-Color LED’s
    Photo 74Photo 75

    // light connected to digital pin 9, 10, 11
    int pins[] = {9, 10, 11};
    void setup()
    {
    // nothing for setup
    }
    void loop()
    {
    // variable to keep the actual value
    int value = 0;
    //variables to check if fade in for a color is complete
    int fadedIn1 = 0;
    int fadedIn2 = 0;
    int fadedIn3 = 0;
    //variables to check if fade out for a color is complete
    int fadedOut1 = 0;
    int fadedOut2 = 0;
    int fadedOut3 = 0;
    //fade in blue
    if (fadedIn1 != 1){
    for(value = 255; value >=0; value-=5)
    {
    analogWrite(pins[1], value);
    delay(60);
    fadedIn1 = 1;
    }
    }
    //fade in green
    if (fadedIn2 != 1){
    for(value = 255; value >=0; value-=5)
    {
    analogWrite(pins[0], value);
    delay(60);
    fadedIn2 = 1;
    }
    }
    //fade in red
    if (fadedIn3 != 1){
    for(value = 255; value >=0; value-=5)
    {
    analogWrite(pins[2], value);
    delay(60);
    fadedIn3 = 1;
    }
    }
    //fade out red
    if (fadedOut1 != 1){
    for(value = 0; value <=255; value+=5)
    {
    analogWrite(pins[2], value);
    delay(60);
    fadedOut1 = 1;
    }
    }
    //fade out green
    if (fadedOut2 != 1){
    for(value = 0; value <=255; value+=5)
    {
    analogWrite(pins[0], value);
    delay(60);
    fadedOut2 = 1;
    }
    }
    //fade out blue
    if (fadedOut3 != 1){
    for(value = 0; value <=255; value+=5)
    {
    analogWrite(pins[1], value);
    delay(60);
    fadedOut3 = 1;
    }
    }
    }

    Here is a short video of the Switch/Case circuit that was presented in class:

    http://vimeo.com/moogaloop.swf?clip_id=3391872&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
    Switch/Case with RGB LEDs from Steve Varga on Vimeo.

    And here is the code:

    int rLED=11;
    int gLED=9;
    int bLED=10;
    int but1=4;
    int but2=3;
    int but3=2;
    void setup() {
    pinMode(rLED, OUTPUT);
    pinMode(gLED, OUTPUT);
    pinMode(bLED, OUTPUT);
    pinMode(but1, INPUT);
    pinMode(but2, INPUT);
    pinMode(but3, INPUT);
    resetLEDs();
    }
    void loop() {
    int numPressed=0;
    if(digitalRead(but1)==LOW) {
    numPressed+=1;
    }
    if(digitalRead(but2)==LOW) {
    numPressed+=1;
    }
    if(digitalRead(but3)==LOW) {
    numPressed+=1;
    }
    Serial.println(numPressed);
    switch(numPressed) {
    case 1:
    resetLEDs();
    analogWrite(rLED,0);
    break;
    case 2:
    resetLEDs();
    analogWrite(gLED,0);
    break;
    case 3:
    resetLEDs();
    analogWrite(bLED,0);
    break;
    default:
    resetLEDs();
    }
    }
    void resetLEDs() {
    analogWrite(rLED,255);
    analogWrite(gLED,255);
    analogWrite(bLED,255);
    }

     
  • Yury Gitman 2:50 pm on February 24, 2009 Permalink | Reply  

    Student Lecture Sections 

    _1_____Yury___________________________2/13/09_
    Structure:  Void Setup, Void Loop,
    Functions:  pinMode, digitalWrite, digitalRead, analogRead, analogWrite,
    Syntax:   (semicolon),{} (curly braces),// (single line comment)
    /* */ (multi-line)

    Constants:
      HIGH/LOW, INPUT/OUTPUT, true/false,

    Arithmetic Operator:
      =, +, -, *, /, %
    _2
    _____Kristen, Cecilia,___________________2/17/09_
    Toggle Switches and Momentary Buttons [Types, Places, Installing]
    Control Structure:  Debounce,  If, If…else, For, While, Do While, Break, Continue, Return.
    Comparison Operators:  ==,!=, <,>,<=,=>
    _3_____Steve, Thai, Bruce_________________2/24/09_
    AnalogWrite, PWM, Fading LED's, 

    Multiple LED's via PWM, Tri-Color LEDs


    Cases, Switch Case, goto

    _4_____Ira, Paola, _______________________3/24/09_
    Analog I/O
    Potentiometers. Faders-From Sparkfun.
    Analog Input, Calibration, Fading, Smoothing
    POT Control of LED's
    _5_____Kristen, Cecila, Joe ________________3/27/09_
    IR Sensors,
    Calibration, Smoothing,  Control LED and Speaker via IR Sensor

    _6____Paola, Ira________________________3/20/09_
    Speakers
    Control Speaker via IR sensor, Play Melody

    _5.5___Katherine, Myriam ________________3/17/09_
    Ultra-Sound Sensors
    Calibration, Smoothing
    Control LED and Speaker via IR Sensor

    _7____Kathrine, Nick, Bruce_______________4/3/09_
    Alcohol Sensors
    Hardware, Inputting Values, Inputting Values, Control Lights

    _8____Steve, Nick, Joe__________________4/10/09_
    Capacitance Sensing Library Via Arduino
    Code, Reading Values, Controlling LED's and Speakers.

     
  • Yury Gitman 2:56 pm on February 20, 2009 Permalink | Reply  

    Prototype 3 

    New iteration of the the time passing LED prototypes. Definitely getting very close to a finished product this time around. Doubled the amount of LEDs, used white spray paint as a diffuser (MUCH better now 🙂 ), and adding some circular masking elements. I can now see what the final iteration will be and I think it will be cool.

    http://vimeo.com/moogaloop.swf?clip_id=3299828&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1
    Time Passing LEDs v0.3 from Steve Varga on Vimeo.

     
  • Yury Gitman 2:41 pm on February 20, 2009 Permalink | Reply  

    LED Passage of Time – Prototype 3 

    On this prototype a majority of my time was assembling the little structure that supports all of the leds over the arduino. I had to figure out how to allow all of the lights to shine on the outer shell, without casting shadows and still have access to the arduino. I built a small platform that supports all of the leds and places them over the arduino while, facing them to the middle height of the outer shell. The yellow led in the center is a 360 white led and gives great diffusion. The inside of the container is diffused using white spraypaint and works well in hiding the guts. I think that combining this iteration with my last one will be my next step.

    Led_proto_3

    http://vimeo.com/moogaloop.swf?clip_id=3299695&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=ff9933&fullscreen=1
    LED Passage of Time — Prototype 3 from Nick Hardeman on Vimeo.

     
  • Yury Gitman 2:21 pm on February 20, 2009 Permalink | Reply  

    :::Fun with switches::: 

    Picture 10

    Fun with switches link

    Where to buy your witches:

    • Sparkfun is great for mini switches
    • For a nice variety of switches go to All Electronics
    • Heavy duty switches can be found in K&M Parts
    • Newark also has a large selection of switches
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel