You should have received a copy of the GNU General Public License GNU General Public License for more details. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is distributed in the hope that it will be useful,īut WITHOUT ANY WARRANTY without even the implied warranty of The Free Software Foundation, either version 3 of the License, or It under the terms of the GNU General Public License as published by This program is free software: you can redistribute it and/or modify The code for the Command Prompt executable is in the code section. That's because I also use the library in a Windows command line application for testing that's compiled with Visual Studio. If you're a C++ programmer you might have noticed that the library has some compile time directives to see if it's being compiled for Arduino.I found setting the controller to Generic Serial is the best option. The dummy nodes won't work as nothing gets exported other than the header. For Vixen users, the code does work with files exported from Vixen as FSEQ.The example uses the default FS library with doesn't support long file names. this_is_a_long_file_name.fseq could be renamed to short.fsq). Note that you need to rename the FSEQ file to the 8.3 format if you're not using a file system library that uses long file names (e.g. You'll need to know where this directory is located later. Set up the Xlights show directory or use the default. You'll be able to see the FSEQ header and any error messages in you Serial terminal.ĭon't forget to set debug off and recompile and upload when your finished. Don 't forge to recompile and upload again. If it's not working change the following line in the example to turn debug on as shown. Next, follow the Xlights process below to create you sequence file, rename it and copy it to the MicroSD card that you'll run on the ESP8266, ESP32 or other board. #define NUM_NODES 240Ĭompile the example code and upload it to the ESP8266 or ESP32. The example below is 240 pixels (4 meters of 60 per meter WS2812/Neopixel). Universes aren't really defined here but I use the term to define the // number of times I want to split up the sequence step channels into. Name of the FSEQ file to play: #define FSEQ_FILE "/show.dat" You'll also need to configure your lights with the following defines: I've used both the FastLED, Adafruit and sent the data via a second SPI interface to an FPGA. The example uses only one universe (output) but can be configured to use more.įinally, you'll also need to tell the FastLED,Adafruit Neopixel or other library which pin you're using and how many LED's/Nodes/Pixels are on that pin. The Card Detect (CD) pin is defined as follows in the example:įor the ESP8266: #define CARD_DETECT_PIN D2įor the ESP32: #define CARD_DETECT_PIN 17Ĭheck that you have the correct number of nodes/pixels per strip defined and if you're using universes in the example make sure they're also defined. The Card Detect (CD) pin gets pulled to ground when there's no card inserted but it will be floating if there's no pull-up resistor (resistor connected to positive). You may need a 10k pull-up resistor connected to this pin to make sure it goes high. If you're using the card detect pin you'll also need to define it. The SD Card SPI PINS on the Wemos D1R2 mini (ESP8266) card are as follows: SCLK = D5/GPIO 5 MISO = D6/GPIO 12 MOSI = D7/GPIO 13 SS = D8/GPIO 15 The SD Card VSPI PINS on the Wemos Lolin32 Lite (ESP32) card are as follows: SCLK = 18 MISO = 19 MOSI = 23 SS = 5 Next, check that you SPI pin's used to read the data from the SD card are correct. The version settings for the sequences are set in on the Sequences tab as shown below.ĭon't forget to select your development board and the COM port for you development board. Note: If you wish to play the FSEQ as in the example project you'll either need to save the FSEQ file in uncompressed format (V1 or V2 Uncompressed) or implement the decompression function in your code. As an example, I renamed my file from single.fseq to show.dat. The standard Arduino file does not support long filenames so you'll need to rename it into the 8.3 format. The open source and free Xlights program generates these files when it saves sequences. The example uses a strip of WS2811/WS2812's but the Xlights FSEQ file jus supplies the colour values and is not specific to any lights. I've tested is with the ( ) and the Polulu Breakout Board for MicroSD Card. I used the Wemos Lolin32 Lite (ESP32) and a Wemos D1 R2 mini (ESP8266) but Arduino compatible boards will work as long as they are fast enough. You're going to need a couple of things to get started as follows: Example program for the FSEQLib Arduino Library using an ESP32
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |