Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glediator animations from SD card on ESP32 #886

KaizenKuba opened this issue Sep 12, 2019 · 0 comments


Copy link

commented Sep 12, 2019

I try to run Glediator aminations from SD card on ESP32 and I have still error:

C:\Users\HP\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: >FastLED version 3.003.000
pragma message "FastLED version 3.003.000"
In file included from C:\Users\HP\Documents\Arduino\libraries\FastLED/FastLED.h:65:0, from >D:\Arduino\GLEDIATOR TO >SD\Glediator_to_SD_z_forum_na_ESP\Glediator_to_SD_z_forum_na_ESP.ino:5:

C:\Users\HP\Documents\Arduino\libraries\FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged >output"

What should I do to run this code on ESP32? I'm new in programming. I use modified code for arduino UNO (on arduino UNO code works correctly):

#include <FastLED.h>
#include <SD.h>
#include <SPI.h>

#define NUM_LEDS 144
#define DATA_PIN 12
#define BAUD_RATE 1000000 //if using Glediator via serial
//#define MISO_PIN 19
//#define MOSI_PIN 24
//#define SCK_PIN 18
#define CS_PIN 5

File fxdata;
//AltSoftSerial bluetooth;

void setup()
//begin serial
Serial.println("SD Test");

//add leds
fill_solid(leds, NUM_LEDS, CRGB::Red);;

//set hardware SPI pins
pinMode(CS_PIN, OUTPUT); // CS/SS pin as output for SD library to work.
digitalWrite(CS_PIN, HIGH); // workaround for sdcard failed error...

//try to begin SPI coms
if (!SD.begin(CS_PIN))
Serial.println("sdcard initialization failed!");
Serial.println("sdcard initialization done.");

// test file open
fxdata ="X.dat"); // read only
if (fxdata)
Serial.println("file open ok");

int serialGlediator ()
while (!Serial.available()) {}

void loop()
//open file
fxdata ="X.dat"); // read only
if (fxdata)
Serial.println("file open ok");

//read and show
while (fxdata.available())
fxdata.readBytes((char*)leds, NUM_LEDS*3);;
FastLED.delay(10); // set the speed of the animation. 20 is appx ~ 500k bauds

// close the file in order to prevent hanging IO or similar throughout time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.