syndilights/PoC
georges 36e97d42e7 a life simulator on an 8x8 building (the life array is 12x8)
including long running loops and dead fields detect: adding random cells
each window is 2 pixels high and 1 pixel wide. spaced by the same amount.
2013-08-08 22:43:38 +02:00
..
7seg test with 4 elements 7segment display 2013-08-04 03:23:22 +01:00
VdL_demo - Sample code 2013-07-25 18:11:52 +02:00
biglife a life simulator on an 8x8 building (the life array is 12x8) 2013-08-08 22:43:38 +02:00
cheap_random - Moved individual Arduino files to their respective folders 2013-08-01 10:59:35 +02:00
leap - Quick mockup of Leap Motion stuff 2013-08-01 18:58:12 +02:00
life make life work 2013-08-03 19:20:00 +01:00
patternplayer make life work 2013-08-03 19:20:00 +01:00
rgb7seg 7segs with colors and stuff 2013-08-04 21:02:32 +01:00
shiftout1 - Moved individual Arduino files to their respective folders 2013-08-01 10:59:35 +02:00
shiftout2 - Moved individual Arduino files to their respective folders 2013-08-01 10:59:35 +02:00
shiftout3 - Moved individual Arduino files to their respective folders 2013-08-01 10:59:35 +02:00
testcolors - Moved individual Arduino files to their respective folders 2013-08-01 10:59:35 +02:00
win7seg some timing corrections 2013-08-05 21:42:51 +01:00
README - Quick mockup of Leap Motion stuff 2013-08-01 18:58:12 +02:00

README

This is the Proof of Concept code for the 4x5 Windows mock-up.
With a 4-7Segment Display on top

It is a static mockup that should be used to make a Video and show off the theory of the project.

Current structure:

PoC/
-> patternplayer
= This plays pre-defined patterns
-> life
= Game of Life
-> leap
= Leap motion controller demo
-> cheap_random
= dirty hack to show random windows
-> 7seg
= 7 segment tester
-> VdL_demo
= Main Demo Folder for the final VdL Demo
-> shiftout1
= Shift register test code
-> shiftout2
= Shift register test code
-> shiftout3
= Shift register test code
-> testcolors
= Test the 16x32 RGB Panel

Leap motion Python issues: under OS-X make sure you use the stock Python interpreter (/usr/bin/python)

The shift Array code is from this Tutorial page:

http://arduino.cc/en/Tutorial/ShiftOut

General information about shift registers: http://en.wikipedia.org/wiki/Shift_register

The one used for driving the 7 segment LED is a standard (SN)74HC595 which is an 8bit Shift register.
Datasheet: http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf

The used module is a 16 segment element with one decimal dot (http://www.adafruit.com/datasheets/BL-S80A-13.PDF)
UHR (Ultra High Red) version

We used a single in-line i(SIL) resistor to make our lives easy. http://en.wikipedia.org/wiki/Resistor
The LED Panel is a 16x32 panel. It is to be used vertically.


^ UP

|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *|
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|

We flipped it 90 degrees ClockWise (CW)
> UP
|- - - - - - - - - - - - - - - -|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|* * * * * * * * * * * * * * * *|
|- - - - - - - - - - - - - - - -|

The Library of course uses the regular orientation. Consider this:

matrix.drawRect(x,y, sizeX, sizeY, matrix.Color888(255,255,255));

x,y are the starting co-ordinates starting from top-left

sizeX, sizeY will be the size of the rectangle we want to draw.

Everything is in pixel (px) logically 1px == 1LED

The ColorXXX() functions are used to define the color "spectrum"

Color333() - 3bit color representation
Color444() - 4bit color representation
Color888() - 8bit color representation

To simulate a grayscale is pretty difficult and needs some hacking:

http://upload.wikimedia.org/wikipedia/commons/9/93/256colour.png

We have 20 windows at our disposal.

I chose the cheapeast and dirties path possible for the PoC and the following map gives you an overview of the addressing of the windows on the mock-up:

> UP
|- - - - - - - - - - - - - - - -|
|X X X X X X X X X X X X X X X X|
|X       X       X       X      |
|X  W    X  W    X  W    X  W   |
|X       X       X       X      |
|X    1  X    6  X   11  X   16 |
|X       X       X       X      |
|X X X X X X X X X X X X X X X X|
|X       X       X       X      |
|X  W    X  W    X  W    X  W   |
|X       X       X       X      |
|X    2  X    7  X   12  X   17 |
|X       X       X       X      |
|X X X X X X X X X X X X X X X X|
|X       X       X       X      |
|X  W    X  W    X  W    X  W   |
|X       X       X       X      |
|X    3  X    8  X   13  X   18 |
|X       X       X       X      |
|X X X X X X X X X X X X X X X X|
|X       X       X       X      |
|X  W    X  W    X  W    X  W   |
|X       X       X       X      |
|X    4  X    9  X   14  X   19 |
|X       X       X       X      |
|X X X X X X X X X X X X X X X X|
|X       X       X       X      |
|X  W    X  W    X  W    X  W   |
|X       X       X       X      |
|X    5  X   10  X   15  X   20 |
|X       X       X       X      |
|X X X X X X X X X X X X X X X X|
|X X X X X X X X X X X X X X X X|
|X X X X X X X X X X X X X X X X|