Rearranging the pixels & control > BlinkyMatrix project [done]
Hi there!
While in anticipation of the arrival of my first blinks tape as it seems a pretty unique offering I'm trying to solve the next issue.
I will cut up the blinky and create 3 4x4 pixel panels from it, sized at +- 60x60 cm, to show some cool Xmas messages and possibly animations. For text I'll use a 4bit font. (No tears, I'll play with blinky as it is first for a day or two).
Could I use the same blinky software and reconfigure it somehow to support my panels?
Any other advice?
If needed I can use a raspberry pi as well.
While in anticipation of the arrival of my first blinks tape as it seems a pretty unique offering I'm trying to solve the next issue.
I will cut up the blinky and create 3 4x4 pixel panels from it, sized at +- 60x60 cm, to show some cool Xmas messages and possibly animations. For text I'll use a 4bit font. (No tears, I'll play with blinky as it is first for a day or two).
Could I use the same blinky software and reconfigure it somehow to support my panels?
Any other advice?
If needed I can use a raspberry pi as well.
Comments
You can definitely use the normal PatternPaint software for this configuration, but it will require a lot of careful image manipulation...it might be a bit tricky, but if you're good with image editing it should be OK. You'll be able to save a simple animation loop that way, but nothing interactive. (There's no built-in way to convert to 4x4 arrays - you'll always see all 60 LEDs in a row.)
If you're stronger with programming, then it might be easier to do this in Processing or something similar. Keep the questions coming and update us with your progress!
Ok, can you confirm that processing 2.2.1 also works well for BT ? So that I'm not chasing ghost issues
http://blinkinlabs.com/blinkytape/processing/ states to use 2.0.2, but thats not marked as a stable Processing release.
Things are coming together, or rather 'apart' actually. The blinky-tape evolved to blinky-matrix now, and the setup is still crude, and not yet made waterproof.
I'm inserting 20cm wire between each led so I can create a larger setup. The Lego blocks allow a bit more robust handling, and the opportunity to play with the design on a plate before putting the set in its bigger setup.
https://www.icloud.com/photostream/#A4532ODW3z;5BFCCFC3-A0AA-4FE2-933C-1A357A86B5CB
In a 12 x 5 setup:
https://www.icloud.com/photostream/#A4532ODW3z;7F1C79EE-10E2-4843-912C-4037CC7C647E
in action:
https://www.icloud.com/photostream/#A4532ODW3z;C8C3424A-9121-4D68-ACE7-7FADEBB5A9D7
I must add that I'm very happy with the design of the strip. Its pretty forgiving in abuse during the process of cutting and handling soldering. The soldering took some efforts, especially the signal wire was sensitive to get right in the beginning. Made a mistake along the way in +5/gnd on one, and this was no issue. restart & OK!
To fix the leds on the blocks I use Bison Polymax Crystal, thats clear as glass in case you get it on the led and plays nice with the clear tape I use to hold the led down while it dries.
Once I get the Process code right, the leds will be installed in a larger setup using simple soupcups as diffusers That should give me a panel of about 1,3Mtr x 0,50Mtr.
https://www.icloud.com/photostream/#A4532ODW3z;891D81A1-66AB-46CB-B858-56F9E0B4E654
So next up is a little re-ordering of the pixels LEDs to form an array of 5 x 12, this way the LEDs are ordered the same as processing natively reads and counts pixels, which then can be translated 1:1 to blinky addresses. \o/
I'm no code wizz, so using native layouts is most appealing to me.
After refitting the board to have the leds ordered like processings pixel array, the below code is able to trace a simple image of 12 wide x 5 high and show this on the led board.
==
{code}
// The simplest possible way to talk to a BlinkyTape
import processing.serial.*;
Serial s;
PImage img;
void setup() {
// Connect to the first serial port we can find
// We assume there is a BlinkyTape there
for(String p : Serial.list()) {
// NOTE: you'll need to change the next line to match the serial port system, i.e. COMx on Windows
if (p.startsWith("COM5")) {
s = new Serial(this, p, 115200);
}
}
size(12, 5); // avoid array out of bounds in your led matrix
loadPixels(); // tell processing your going to mess with pixels
frameRate(1); // no rush here right
}
void draw() {
img = loadImage("test.png");
// yes this loadImage is intentionally not in setup so I can leave this running and change the image in
//paint + press save, then it updates by itself
// Loop through every pixel column
for (int y = 0; y < height; y++) {
// Loop through every pixel row
for (int x = 0; x < width; x++) {
// Use the formula to find the 1D location
int loc = x + y * width;
// look at the pixel and send to the led in r,g,b
s.write((byte)min(254, red(img.pixels[loc])));
s.write((byte)min(254, green(img.pixels[loc])));
s.write((byte)min(254, blue(img.pixels[loc])));
}
}
updatePixels(); //close your pixel use
s.write((byte)255); //push to blinkymatrix
}
{code}
Next Up; From lego plate to multiplex board of 190x80 cm
blinkymatrix+ambitape script = disco wall \0/
https://www.icloud.com/photostream/#A4532ODW3z;9998AD6A-E553-4343-91EC-56075DBBD0B8
https://www.icloud.com/photostream/#A4532ODW3z;B4C67DEA-BB06-4DE6-9E07-EB2BE027B84B
Happy Xmas!!
The end result (for now):
https://www.icloud.com/photostream/#A4532ODW3z;745B0B06-EBFA-409F-9277-F005BBDDC823
--
The code is basically a re-used ticker script, and tracing using pixel control. Finding the right font took some time & Play and I ended up with 5x5-Pixel at size 8, weird enough (the max hight is 5px), mashed all that together makes this ''good enough". But hey it works.
The code:
https://gist.github.com/anonymous/5bcc21120a1fc6b63ba4
The font:
http://www.dafont.com/5x5-pixel.font