In this projects, we learn about
how to make Pixel led SD card controller using Arduino
Parts required
- I used the following parts in this project
- pixel led – https://amzn.to/39JX9VI
- Arduino UNO – https://amzn.to/2WDwGEh
- SMPS – https://amzn.to/2zIjuEM
- micro sd card Adapter – https://amzn.to/3sBS2zx
Wiring
Code for How to make pixel led Sd card controller using Arduino
#include "FastLED.h" // add fastled library
#include // add sdfat library
#define NUM_LEDS 225 // total leds
#define DATA_PIN 7 // led data pin
CRGB leds[NUM_LEDS];
//SD chip select pin
const uint8_t chipSelect = SS; //chipSelect = 10;
SdFat sd;
SdFile file;
void setup() {
// Uncomment/edit one of the following lines for your leds arrangement.
// FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS); // led in use - ws2811 with color sequence RGB
// FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
sd.begin(chipSelect, SPI_FULL_SPEED);
/*******************************************/
// open first effect file - rainbow.dat
// file size 70,800 bytes
//or
// total leds 118
// 3 bytes for each rgb color
// total recorded frames 200
// 118 x 3 X 200 = 70,800 bytes
/*******************************************/
file.open("D0.dat", O_READ);
for(int i = 0 ;i<200;i++) // 200 frames
{
file.read((uint8_t*)leds,NUM_LEDS*3); // total bytes(buffer) for each frame 118 x 3 = 354
FastLED.show();
delay(40); // delay between each frame
}
file.close();
}
Software –
download – https://www.rgbscreenrecorder.com/download.html
after compilation of code make program through screen recorder software and put in sd card and play in your Arduino controller