miércoles, 30 de abril de 2014

lunes, 28 de abril de 2014

LEDS y persistencia retiniana

Me gustaría hacer algo así en una peggy 2, que
es un board de leds como este:

¿Qué es un led?
The Peggy2 is technically a one color display (the color of the LEDs). However, it can display varying levels of brightness with a bit of programming. The Peggy2 hardware is limited to displaying 16 levels of brightness. It is possible to write a program that displays more than 16 levels, but it will result in an unstable display. The LEDs will shimmer and not appear to be steadily illuminated.
In an image file, or on a computer screen, shades of gray are colors just like any other color like red or blue. So, it is valid to refer to shades of gray as colors. An image file that contains only shades of gray is referred to as a grayscale image. The Peggy2 can display grayscale images. The shades of gray in the image file correspond to levels of brightness on the Peggy2. BMP2PEG automatically converts full-color images to grayscale.
The Peggy2 does not have an explicit brightness level, nor does it simply turn LEDs on or off. It actually sends a brief jolt of electricity to each LED and illuminates it for a fraction of a second. By repeating the jolts very quickly, the LEDs appear to be on. This phenomenon is called persistence of vision. By varying the frequency of jolts of electricity to an LED, the Peggy2 can vary the brightness. An LED that gets more jolts per second appears brighter than LEDs getting fewer jolts per second. In this way, each LED on the Peggy2 can be a different level of brightness.

lunes, 14 de abril de 2014