Hai any one can help me to play LEDBuild output file .Dat play with node mcu and SD card The Dat file of LED Matrix studio is playing correct but cannot play LEDBuild Dat file
#include <Adafruit_NeoPixel.h>
#include <SPI.h>
#include <SD.h>
#define DATA_PIN D3
#define NUM_LEDS 161
#define PIN_SPI_CS D8
#define FRAME_SIZE (NUM_LEDS * 3) // Each frame has 3 bytes per LED (RGB)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);
File dataFile;
const unsigned long frameDelay = 100; // Adjust based on desired frame rate
void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
strip.setBrightness(255);
Serial.begin(9600);
if (!SD.begin(PIN_SPI_CS)) {
Serial.println("SD Card initialization failed!");
return;
}
dataFile = SD.open("matrix.dat");
if (!dataFile) {
Serial.println("Failed to open file");
return;
}
}
void loop() {
if (dataFile) {
while (true) {
if (dataFile.available() < FRAME_SIZE) {
// If not enough bytes available for one frame, restart from beginning
dataFile.seek(0);
continue;
}
for (int i = 0; i < NUM_LEDS; i++) {
uint8_t r = dataFile.read();
uint8_t g = dataFile.read();
uint8_t b = dataFile.read();
strip.setPixelColor(i, strip.Color(r, g, b));
}
strip.show();
delay(frameDelay);
// Check if we've reached the end of the file
if (dataFile.position() == dataFile.size()) {
dataFile.seek(0); // Restart from beginning
}
}
dataFile.close();
}
}
I have no idea what LED Matrix studio is nor what LEDBuild is. If those are programs that generate patterns, are those patterns compatible?
What does "cannot play" mean?
This strikes me a little as odd; it will basically hang forever if the file size is too small.
1 Like
xfpd
August 10, 2024, 5:31pm
3
sterretje:
basically hang forever
This does nothing. It goes into the "while" then breaks out of the "while" on the first run.
Are you still working on this?
Hai All friend following is the pixel led project the pixel data load from SD card by reading RGBMatrix.bin and settings pixel type and Num_led getting from Sd card Config.txt file following is working and my next requirement is as follows
SD card Have
RGBMatrix1.bin // to D3 data1 ouput
RGBMatrix2.bin // to Do Data2 output
config1.txt for Matrix 1 setting
Config2,txt for matrix 2 setting
so i need to run both matrix same time by reading SD card file
so please help me to modify this follo…
This is different attempt for two Pixel LED software. both are generating DAT file and LED Matrix Studio DAT file is working correctly in pixel led matrix. but the LED Build DAT file Is not working correctly
DAT is just an extension; it does not indicate anything about the format of the data. Without the specifications of the format, you will have a hard time understanding what goes wrong.
Do both programs state that they generate a compatible format?
Yes both software generate .Dat file and can run the animation pixel LED. The format of the Dat file is different so animation also then different. The code which I send from 1st Post is working for LED Matrix Studio Dat file. So I need to change this code for LEDBuild Dat file I have attached both Dat files opening from Note pad can see different
Find the spec for each .dat format, analyse it and adjust the code. It's really that simple; but you need to know the spec of each format.
how to open Dat file? I open from Notepad Its Show just symbol and as per the paten of Symbol looks like Different But Don't have any Idea to Correct the code
You can not just throw two dat files at us. We do not know what they are supposed to represent and we don't know if they reflect exactly the same pattern. Based on analysis they are different after a certain point (I haven't checked where).
This is the beginning of 7x7LEDBuild.dat
000000 01 00 48 45 52 40 0e c0 52 42 0e c0 6c 8c be 65 >..HER@..RB..l..e<
000010 01 00 0a 4e 60 f2 04 20 0c c2 ee e2 09 7f 11 1d >...N`.. ........<
000020 7b 20 25 00 12 a0 03 20 01 00 d4 55 03 00 00 00 >{ %.... ...U....<
000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
0001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
## header end ########################################
000200 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000220 00 00 00 00 00 00 00 ff 00 00 ff 00 00 00 00 00 >................<
000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
And this is the beginning of 7x7LEDMatrixStudio.dat
000000 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000020 00 00 00 00 00 00 00 f0 00 00 f0 00 00 00 00 00 >................<
000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000050 00 f0 00 00 f0 00 00 00 00 00 00 00 00 00 00 00 >................<
000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
The LEDBuild file has a header. The actual data starts at 0x200.
I've only checked the first few rows. If you skip the first 0x200 bytes of the LEDBuild.dat file, you (seem to) get the same pattern, at least in the beginning.
Is this the LEDBuild software? https://lededittm.com/led-build-software-download/
manojkb:
how to open Dat file?
With a hex editor; I'm using Linux and used the command od -A x -t x1z -v 7x7LEDMatrixStudio.dat
; under Windows I used to use frhed.
Both Dat file have same animation.. When I give animation 7x7 matrix to move first row to upper row , The LED Build Dat file move Colm left to right That's what need to modify code. LED Matrix Studio Dat file is moving first row to upper row means it is correct with this Arduino code.
Yes You a Link Is LED Build Download link is bottom of page in side REd box
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
Yes I also observed LED Build Dat is having something than Animation. As you tolled Header but no Idea what is that. Is it need to remove header?
xfpd
August 15, 2024, 2:27pm
13
Why not post both data files as code? Do the two data files make the same animation happen on the same hardware?
This is the LEDBuild Dat
01 00 48 45 54 E0 1E 20 54 E2 1E 20 BF A2 04 EE 01 00 15 AE 76 12 04 80 0A C2 F2 42 1B 5F 1A FD 73 E0 2C A0 0B C0 16 A0 13 80 C1 55 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
This Is LED Matrix Studio dat
F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Remove the first 512 bytes; or ignore them in your code. Next test and see if it works.
system
Closed
February 11, 2025, 2:40pm
18
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.