openobject.org

Research

From Physical Programming

Research

This page is to inform my prototype and major project. Its is purely research on all things for the electronic side of the project and will cover the basics such as

  • Components
  • Script
  • Skills


LED"S

LEDs are diverse, they are used as low-energy indicators but also for replacements for traditional light sources in general lighting and automotive lighting. The compact size of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are useful in communications technology.

Efficiency and operational parameters

Typical indicator LEDs are designed to operate with no more than 30–60 milliwatts [mW] of electrical power. Around 1999, Philips Lumileds introduced power LEDs capable of continuous use at one watt [W]. These LEDs used much larger semiconductor die sizes to handle the large power inputs. Also, the semiconductor dies were mounted onto metal slugs to allow for heat removal from the LED die.

Image:750px-Verschiedene LEDs.jpg

One of the key advantages of LED-based lighting is its high efficiency, as measured by its light output per unit power input. White LEDs quickly matched and overtook the efficiency of standard incandescent lighting systems.



LEDs offer a wide variety of significant enhancements over other types of illumination. In the list below for some of the major advantages are highlighted.

  • Life time expectancy is far beyond that of ordinary bulbs/tubes (typ.>100.000 hrs ~10years continuous). This means minimal downtime for the machine.
  • Small physical dimensions. This means flexibility with regard to fitting the light source into the application and enables a wider spectrum of illumination techniques.
  • Low voltage supply means simple installation.
  • The light has a relatively narrow spectrum (when non-white) which reduces acromatic aberration in the lens which again gives a better contrast.
  • Low power consumption. This means low cost of energy (Example: 2*150W halogen bulb vs. 2*3 W LED: 2575KWh saved pr. year).
  • Low heat dissipation. Does not influence measured object due to heat dissipation.
  • No fan is required meaning no dust problems.
  • Dynamic range over 1:200.

Script

Script is the the way that I'm going to have my matrix react for me. Processing is a code that allows you to create events that can be downloaded to a Mirco-controller allowing a series of events or actions to happen. We are using Processing website for libraries for basic script.

Basic Code

Your basic code for beginners is also from top to bottom and as taught on the program is a line.

line (25, 45, 25, 50)

This allows for a starting point, finishing point and also the length of the line. Below is the introduction of the screen size 400,400, or the colour of the background (192, 64, 0)-three numbers because you can setup your colouring through RGB.

    size(400, 400);
    background(192, 64, 0);
    stroke(255);
    line(150, 25, 270, 350);

Stoking is the outline of the shape or line these are a few ways the the colour can be selected.

    stroke(255);               // sets the stroke color to white
    stroke(255, 255, 255);     // identical to the line above
    stroke(255, 128, 0);       // bright orange (red 255, green 128, blue 0)
    stroke(#FF8000);           // bright orange as a web color
    stroke(255, 128, 0, 128);  // bright orange with 50% transparency

A program written as a list of statements (like the previous examples) is called a static mode sketch. In static mode, a series of functions are used to perform tasks or create a single image without any animation or interaction. Interactive programs are drawn as a series of frames, which you can create by adding functions titled setup() and draw() as shown in the code below. These are built-in functions that are called automatically.

    void setup() {
      size(400, 400);
      stroke(255);
      background(192, 64, 0);
    } 
    void draw() {
      line(150, 25, mouseX, mouseY);
    }


The setup() block runs once, and the draw() block runs repeatedly. As such, setup() can be used for any initialization; in this case, setting the screen size, making the background orange, and setting the stroke color to white. The draw() block is used to handle animation. The size() function must always be the first line inside setup().

Because the background() function is used only once, the screen will fill with lines as the mouse is moved. To draw just a single line that follows the mouse, move the background() function to the draw() function, which will clear the display window (filling it with orange) each time draw() runs.

    void setup() {
      size(400, 400);
      stroke(255);
    }
    void draw() {
      background(192, 64, 0);
      line(150, 25, mouseX, mouseY);
    }


Static mode programs are most commonly used for extremely simple examples, or for scripts that run in a linear fashion and then exit. For instance, a static mode program might start, draw a page to a PDF file, and exit.

Most programs will employ active mode, which use the setup() and draw() blocks. More advanced mouse handling can also be introduced; for instance, the mousePressed() function will be called whenever the mouse is pressed. So in the following example, when the mouse is pressed, the screen is cleared via the background() function:

    void setup() {
      size(400, 400);
      stroke(255);
    }
    void draw() {
      line(150, 25, mouseX, mouseY);
    }
    
    void mousePressed() {
      background(192, 64, 0);