Updates from November, 2011 Toggle Comment Threads | Keyboard Shortcuts

  • Yury Gitman 7:28 pm on November 11, 2011 Permalink | Reply  

    Schedule for Rest of Semester 

    Oct 11:   LOL homework,
    Make  an enclosure of your screen LOL that diffuses the light. Create software that uses dynamic scrolling text and a interactive activated animation.
    Buy second Arduino

    Nov 18:   Show twitting Displays, Homework.  Pulse Sensor and Sound group present.
    Make either:  A project the displays the HeartRate in a physical form (can be LOL)  OR  Make a Sound Message Box with 2-3 switches and 2-3 LED’s.

    Nov 25:  Thanks Giving No Class

    Dec 2:    Present Homework.  Do the second assignment.

    Dec 9:   Present prototypes for review.

    Dec 16:  Presentation 2 project to guest crits.

     
  • mónica arias. 5:58 pm on November 11, 2011 Permalink | Reply  

    LoL shield: scrolling text code. 

    /*
      Requires LoL Shield library, at least V0.2Beta
    
    http://code.google.com/p/lolshield/downloads/list
    
      And the Font.cpp from LoL_Shield-100915.zip on ikkei's page:
    
    http://web.mac.com/kxm_ikkei/Site/LoL.html
    
      Based on original TEXT SAMPLE CODE for LOL Shield for Arduino
      Copyright 2009/2010 Benjamin Sonntag <benjamin@sonntag.fr> http://benjamin.sonntag.fr/
    
      (This version edited by Walfas)
    */
    
    #include "Charliplexing.h"
    #include "Font.h"
    #include "WProgram.h"
    
    // Technically the number of columns of LEDs minus one
    #define SCREEN_WIDTH 13
    
    // Scroll delay: lower values result in faster scrolling
    #define SCROLL_DELAY 80
    
    /* How long to wait after the last letter before
        going back to the beginning and repeating */
    #define REPEAT_DELAY 500
    
    int textLength, totalPixels;
    char text[]="HI CLASS WE MADE IT THIS IS OUR LOL SHIELD PRESENTATION";
    
    void setup() {
      LedSign::Init();
      getLength(text, &textLength, &totalPixels);
    }
    
    void loop() {
      int x=0;
      for(int j=SCREEN_WIDTH; j>-totalPixels-SCREEN_WIDTH; j--) {
        x=j;
        LedSign::Clear();
        for(int i=0; i<textLength; i++) {
          x += Font::Draw(text[i],x,0);
          if (x>=SCREEN_WIDTH)
            break;
        }
        delay(SCROLL_DELAY);
      }
      delay(REPEAT_DELAY);
    }
    
    void getLength(char* charArray, int* lengthPtr, int* pixelPtr) {
      /* Finds the length of a string in terms of characters
         and pixels and assigns them to the variable at
         addresses lengthPtr and pixelPtr, respectively. */
    
      int charCount = 0, pixelCount = 0;
      char * charPtr = charArray;
    
      // Count chars until newline or null character reached
      while (*charPtr != '\0' && *charPtr != '\n') {
        charPtr++;
        charCount++;
    
        /* Increment pixelCount by the number of pixels
           the current character takes up horizontally. */
        pixelCount += Font::Draw(*charPtr,-SCREEN_WIDTH,0);
      }
    
      *pixelPtr = pixelCount;
      *lengthPtr = charCount;
    }
    
     
  • hirumi 5:16 pm on November 11, 2011 Permalink | Reply  

    LOLShieldHammerTime 

    template
    jimmierodgers
    Hammer Time Excel Animation Template
    
    
    #include <avr/pgmspace.h>  //This is in the Arduino library 
    
    int blinkdelay = 75; //This basically controls brightness. Lower is dimmer
    int runspeed = 20;   //smaller = faster
    
    int pin13 =13;
    int pin12 =12;
    int pin11 =11;
    int pin10 =10;
    int pin09 =9;
    int pin08 =8;
    int pin07 =7;
    int pin06 =6;
    int pin05 =5;
    int pin04 =4;
    int pin03 =3;
    int pin02 =2;
    
    const int pins[] = {
      pin13,pin12,pin11,pin10,pin09,pin08,pin07,pin06,pin05,pin04,pin03,pin02};
    
    const int ledMap[126][2] ={
    {pin13, pin05},{pin13, pin06},{pin13, pin07},{pin13, pin08},{pin13, pin09},{pin13, pin10},{pin13, pin11},{pin13, pin12},{pin13, pin04},{pin04, pin13},{pin13, pin03},{pin03, pin13},{pin13, pin02},{pin02, pin13},
    {pin12, pin05},{pin12, pin06},{pin12, pin07},{pin12, pin08},{pin12, pin09},{pin12, pin10},{pin12, pin11},{pin12, pin13},{pin12, pin04},{pin04, pin12},{pin12, pin03},{pin03, pin12},{pin12, pin02},{pin02, pin12},
    {pin11, pin05},{pin11, pin06},{pin11, pin07},{pin11, pin08},{pin11, pin09},{pin11, pin10},{pin11, pin12},{pin11, pin13},{pin11, pin04},{pin04, pin11},{pin11, pin03},{pin03, pin11},{pin11, pin02},{pin02, pin11},
    {pin10, pin05},{pin10, pin06},{pin10, pin07},{pin10, pin08},{pin10, pin09},{pin10, pin11},{pin10, pin12},{pin10, pin13},{pin10, pin04},{pin04, pin10},{pin10, pin03},{pin03, pin10},{pin10, pin02},{pin02, pin10},
    {pin09, pin05},{pin09, pin06},{pin09, pin07},{pin09, pin08},{pin09, pin10},{pin09, pin11},{pin09, pin12},{pin09, pin13},{pin09, pin04},{pin04, pin09},{pin09, pin03},{pin03, pin09},{pin09, pin02},{pin02, pin09},
    {pin08, pin05},{pin08, pin06},{pin08, pin07},{pin08, pin09},{pin08, pin10},{pin08, pin11},{pin08, pin12},{pin08, pin13},{pin08, pin04},{pin04, pin08},{pin08, pin03},{pin03, pin08},{pin08, pin02},{pin02, pin08},
    {pin07, pin05},{pin07, pin06},{pin07, pin08},{pin07, pin09},{pin07, pin10},{pin07, pin11},{pin07, pin12},{pin07, pin13},{pin07, pin04},{pin04, pin07},{pin07, pin03},{pin03, pin07},{pin07, pin02},{pin02, pin07},
    {pin06, pin05},{pin06, pin07},{pin06, pin08},{pin06, pin09},{pin06, pin10},{pin06, pin11},{pin06, pin12},{pin06, pin13},{pin06, pin04},{pin04, pin06},{pin06, pin03},{pin03, pin06},{pin06, pin02},{pin02, pin06},
    {pin05, pin06},{pin05, pin07},{pin05, pin08},{pin05, pin09},{pin05, pin10},{pin05, pin11},{pin05, pin12},{pin05, pin13},{pin05, pin04},{pin04, pin05},{pin05, pin03},{pin03, pin05},{pin05, pin02},{pin02, pin05}
    };
    
    uint16_t BitMap[][9] PROGMEM = {
    {0, 0, 0, 1, 0, 0, 0, 1, 0},
    {1, 1, 1, 2, 1, 0, 1, 2, 0},
    {3, 2, 3, 5, 3, 1, 2, 4, 0},
    {7, 4, 7, 10, 7, 2, 5, 8, 0},
    {14, 10, 14, 20, 14, 5, 10, 17, 0},
    {28,20, 28, 8, 62, 8, 20, 34, 0},
    {56, 40, 56, 20, 56, 80, 40, 68, 0},
    {112, 80, 112, 32, 248, 32, 80, 136, 0},
    {224, 160, 224, 320, 224, 80, 160, 272, 0},
    {448, 320, 448, 128, 992, 128, 320, 544, 0},
    {896, 640, 896, 320, 896, 1280, 640, 1088},
    {1792, 1280, 1792, 512, 3968, 512, 1280, 2176, 0},
    {3584, 2560, 3584, 5120, 3584, 1280, 2560, 4352, 0},
    {7168, 5120, 7168, 2048, 15872, 2048, 5120, 8704, 0},
    {14336, 10240, 14336, 5120, 14336, 4096, 10240, 1024, 0},
    {12288, 4096, 12288, 8192, 14336, 8192, 4096, 2048, 0},
    {8192, 8192, 8192, 4096, 8192, 0, 8192, 4096, 0},
    {0, 0, 0, 0, 8192, 0, 0, 8192, 0},
    {8192, 8192, 8192, 4096, 8192, 0, 8192, 4096, 0},
    {12288, 4096, 12288, 8192, 14336, 8192, 4096, 2048, 0},
    {14336, 10240, 14336, 5120, 14336, 4096, 10240, 1024, 0},
    {7168, 5120, 7168, 2048, 15872, 2048, 5120, 8704, 0},
    {3584, 2560, 3584, 5120, 3584, 1280, 2560, 4352, 0},
    {1792, 1280, 1792, 512, 3968, 512, 1280, 2176, 0},
    {896, 640, 896, 320, 896, 1280, 640, 1088},
    {448, 320, 448, 128, 992, 128, 320, 544, 0},
    {224, 160, 224, 320, 224, 80, 160, 272, 0},
    {112, 80, 112, 32, 248, 32, 80, 136, 0},
    {56, 40, 56, 20, 56, 80, 40, 68, 0},
    {28,20, 28, 8, 62, 8, 20, 34, 0},
    {14, 10, 14, 20, 14, 5, 10, 17, 0},
    {7, 4, 7, 10, 7, 2, 5, 8, 0},
    {3, 2, 3, 5, 3, 1, 2, 4, 0},
    {1, 1, 1, 2, 1, 0, 1, 2, 0},
    {0, 0, 0, 1, 0, 0, 0, 1, 0},
    {18000}
    };
    
    void setup() {
      blinkall(2); // useful for testing
    }
    void loop() {
      //sequenceon(); // useful for testing
      DisplayBitMap();
    }
    void turnon(int led) {
      int pospin = ledMap[led][0];
      int negpin = ledMap[led][1];
      pinMode (pospin, OUTPUT);
      pinMode (negpin, OUTPUT);
      digitalWrite (pospin, HIGH);
      digitalWrite (negpin, LOW);
    }
    
    void alloff() {
      DDRD = B00000010;
      DDRB = B00000000;
    }
    
    void DisplayBitMap()
    {
      boolean run=true;
      byte frame = 0;
      byte line = 0;
      unsigned long data;
      while(run == true) {
        for(int i = 0; i < runspeed; i++)     {
          for(line = 0; line < 9; line++)       {
            data = pgm_read_word_near (&BitMap[frame][line]);   // fetch data from program memory
            if (data==18000){
              run=false;
            }
            else for (byte led=0; led<14; ++led) {
              if (data & (1<<led)) {
                turnon((line*14)+led);
                delayMicroseconds(blinkdelay);
                alloff();
              }
              else {
                delayMicroseconds(blinkdelay);
              }
            }
    
          }
    
        } frame++;
      }
    }
    
    void blinkall(int numblink) {
      alloff();
      for(int n = 0;n < numblink;n++)   {
        for(int i = 0; i < runspeed; i++)     {
          for(int j = 0; j < 126; j++)       {
            turnon(j);
            delayMicroseconds(blinkdelay);
            alloff();
          }
        }
        delay(500);
      }
    }
    
    void sequenceon() {
      for(int i = 0; i < 126; i++)   {
        turnon(i);
        delay(800);
        alloff();
        delay(800);
      }
    }
    
     
  • Fred Andrade 4:35 pm on November 11, 2011 Permalink | Reply  

    Kitteh 

    Here is the Kitteh pumpkin, also known as the Cat-O-Lantern.

    It is very temperamental and has a lot to say about physical contact.

    It has two individual LEDs for eyes, driven by pin 2, eight LEDs in series for the mouth driven by pin 5, and a PING ultrasonic sensor driven by pin 7.

    The PING ultrasonic sensor discriminates between two states.

    The ground state is when there is a distance of at least 50cm between the PING sensor and anything. In the ground state, the eyes blink randomly and the mouth pulsates slowly.

    When something comes closer than 50cm, the active state takes over, making the eyes blink rapidly and the mouth pulsate fast.

    It returns to normal once the distance of 50cm is restored.

    (More …)

     
  • Catalina 3:10 am on November 11, 2011 Permalink | Reply  

    Pumpkin-Sky Lamp by Catalina Cortázar 

    Pumpkin-Sky Lamp

    The concept is a lamp that interacts with the environment.

    The lamp consists on a black-pumpkin, as night, which has blue LEDs and one RGB Led.
    Every time the light of the room is turned off, when it becomes dark, the blue LEDs light up and there is one Led that is purple.

    When the PIR motion sensor is activated, when someone is near the lamp, all of the LEDs become blue and they start blinking.

    When the room light is turn on, and the room lights up, the lamp turns off.

    (More …)

     
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