From f5702fe80f637a235136216ee23807774ae7d8f0 Mon Sep 17 00:00:00 2001 From: seanspotatobusiness Date: Thu, 12 Jan 2017 16:19:20 +0000 Subject: [PATCH 01/12] Update README.md Added Arduino IDE preparations to Installing section. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 19cc4ab..6751933 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ The only drawback to SPIFFS that I've found so far is uploading the files is ext Installing ----------- +These programs are installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the [Arduino ESP8266FS tool](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system). From 1e9b486cfd9dea691bb70a33b6cbf11cad15b957 Mon Sep 17 00:00:00 2001 From: seanspotatobusiness Date: Thu, 12 Jan 2017 18:57:23 +0000 Subject: [PATCH 02/12] Update README.md Added Step to download files from GitHub (not obvious what to download or where if you're new to this) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6751933..f0b71c7 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Installing ----------- These programs are installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. +Download the programs from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. + The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the [Arduino ESP8266FS tool](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system). With ESP8266FS installed run the sketch and then upload the web app using `ESP8266 Sketch Data Upload` command in the Arduino Tools menu. From 608a7827d2cbb22fee8c5c1fcefad7ea55b982a7 Mon Sep 17 00:00:00 2001 From: seanspotatobusiness Date: Fri, 27 Jan 2017 22:11:49 +0000 Subject: [PATCH 03/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f0b71c7..5bf5209 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Installing ----------- These programs are installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. +These programs depend on the FastLED LED animation library which can be [downloaded from GitHub](https://github.com/FastLED/FastLED/releases) and placed in the Arduino 'libraries' folder or alternatively installed as [described here](https://www.arduino.cc/en/Guide/Libraries). + Download the programs from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the [Arduino ESP8266FS tool](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system). From 95e5f27cafa2bc56e933de6caf586383642e0445 Mon Sep 17 00:00:00 2001 From: seanspotatobusiness Date: Fri, 27 Jan 2017 22:13:38 +0000 Subject: [PATCH 04/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bf5209..2833314 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Installing ----------- These programs are installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. -These programs depend on the FastLED LED animation library which can be [downloaded from GitHub](https://github.com/FastLED/FastLED/releases) and placed in the Arduino 'libraries' folder or alternatively installed as [described here](https://www.arduino.cc/en/Guide/Libraries). +These programs depend on the FastLED LED animation library which can be [downloaded from GitHub](https://github.com/FastLED/FastLED/releases) and placed in the Arduino 'libraries' folder or alternatively installed as [described here](https://www.arduino.cc/en/Guide/Libraries) by typing 'fastled' in the search filter box. Download the programs from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. From e28346a6eeb40cf23463d07469aebb58b01ba7e9 Mon Sep 17 00:00:00 2001 From: seanspotatobusiness Date: Fri, 27 Jan 2017 22:18:50 +0000 Subject: [PATCH 05/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2833314..5f24ea0 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Installing ----------- These programs are installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. -These programs depend on the FastLED LED animation library which can be [downloaded from GitHub](https://github.com/FastLED/FastLED/releases) and placed in the Arduino 'libraries' folder or alternatively installed as [described here](https://www.arduino.cc/en/Guide/Libraries) by typing 'fastled' in the search filter box. +These programs depend on the FastLED LED animation library and the IRremoteESP8266 library. The FastLED library can be [downloaded from GitHub](https://github.com/FastLED/FastLED/releases) and placed in the Arduino 'libraries' folder or alternatively installed as [described here](https://www.arduino.cc/en/Guide/Libraries) by typing 'fastled' in the search filter box. The IRremoteESP8266 must be insalled manually by [downloading](https://github.com/markszabo/IRremoteESP8266) and placing the uncompressed folder in the Arduino 'libraries' folder. Download the programs from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. From 681c29a8776a40026a26365d3988dedd38526417 Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Sat, 18 Feb 2017 13:24:05 -0600 Subject: [PATCH 06/12] Added palette selector * Added palette selector and supporting code. * Switched several patterns to use the selected palette: Confetti, Sinelon, BPM, Juggle * Limit EEPROM writes in autoplay mode. --- data/index.htm | 10 ++- data/js/scripts.js | 25 ++++++ esp8266-fastled-webserver.ino | 141 ++++++++++++++++++++++++++++------ 3 files changed, 148 insertions(+), 28 deletions(-) diff --git a/data/index.htm b/data/index.htm index fc06787..279ae42 100644 --- a/data/index.htm +++ b/data/index.htm @@ -52,9 +52,13 @@
+
+ +
+ +
+
diff --git a/data/js/scripts.js b/data/js/scripts.js index b1e408f..5a05493 100644 --- a/data/js/scripts.js +++ b/data/js/scripts.js @@ -70,6 +70,10 @@ $("#inputPattern").change(function() { setPattern($("#inputPattern option:selected").index()); }); +$("#inputPalette").change(function() { + setPalette($("#inputPalette option:selected").index()); +}); + $("#inputColor").change(function() { if(ignoreColorChange) return; @@ -105,15 +109,30 @@ function getAll() { updatePowerButtons(data.power); + // clear pattern list $("#inputPattern").find("option").remove(); + // load pattern list for(var i = 0; i < data.patterns.length; i++) { var pattern = data.patterns[i]; $("#inputPattern").append(""); } + // select the current pattern $("#inputPattern").val(data.currentPattern.index); + // clear palette list + $("#inputPalette").find("option").remove(); + + // load palette list + for(var i = 0; i < data.palettes.length; i++) { + var palette = data.palettes[i]; + $("#inputPalette").append(""); + } + + // select the current palette + $("#inputPalette").val(data.currentPalette.index); + $("#status").html("Ready"); }); } @@ -154,6 +173,12 @@ function setPattern(value) { }); } +function setPalette(value) { + $.post(urlBase + "palette?value=" + value, function(data) { + $("#status").html("Set Palette: " + data.name); + }); +} + function delaySetColor(value) { clearTimeout(colorTimer); colorTimer = setTimeout(function() { diff --git a/esp8266-fastled-webserver.ino b/esp8266-fastled-webserver.ino index 5c631da..48399d5 100644 --- a/esp8266-fastled-webserver.ino +++ b/esp8266-fastled-webserver.ino @@ -1,20 +1,20 @@ /* - * ESP8266 + FastLED + IR Remote + MSGEQ7: https://github.com/jasoncoon/esp8266-fastled-webserver - * Copyright (C) 2015 Jason Coon - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + ESP8266 + FastLED + IR Remote + MSGEQ7: https://github.com/jasoncoon/esp8266-fastled-webserver + Copyright (C) 2015 Jason Coon + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ #include "FastLED.h" FASTLED_USING_NAMESPACE @@ -46,7 +46,7 @@ const char* password = ""; ESP8266WebServer server(80); -#define DATA_PIN 13 // for Huzzah: Pins w/o special function: #4, #5, #12, #13, #14; // #16 does not work :( +#define DATA_PIN D8 // for Huzzah: Pins w/o special function: #4, #5, #12, #13, #14; // #16 does not work :( #define LED_TYPE WS2812 #define COLOR_ORDER GRB #define NUM_LEDS 24 @@ -89,6 +89,8 @@ bool autoplayEnabled = false; uint8_t autoPlayDurationSeconds = 10; unsigned int autoPlayTimeout = 0; +uint8_t currentPaletteIndex = 0; + uint8_t gHue = 0; // rotating "base color" used by many of the patterns CRGB solidColor = CRGB::Blue; @@ -245,6 +247,16 @@ void setup(void) { sendBrightness(); }); + server.on("/palette", HTTP_GET, []() { + sendPalette(); + }); + + server.on("/palette", HTTP_POST, []() { + String value = server.arg("value"); + setPalette(value.toInt()); + sendPalette(); + }); + server.serveStatic("/index.htm", SPIFFS, "/index.htm"); server.serveStatic("/fonts", SPIFFS, "/fonts", "max-age=86400"); server.serveStatic("/js", SPIFFS, "/js"); @@ -260,7 +272,6 @@ void setup(void) { } typedef void (*Pattern)(); -typedef Pattern PatternList[]; typedef struct { Pattern pattern; String name; @@ -283,6 +294,36 @@ PatternAndNameList patterns = { const uint8_t patternCount = ARRAY_SIZE(patterns); +typedef struct { + CRGBPalette16 palette; + String name; +} PaletteAndName; +typedef PaletteAndName PaletteAndNameList[]; + +const CRGBPalette16 palettes[] = { + RainbowColors_p, + RainbowStripeColors_p, + CloudColors_p, + LavaColors_p, + OceanColors_p, + ForestColors_p, + PartyColors_p, + HeatColors_p +}; + +const uint8_t paletteCount = ARRAY_SIZE(palettes); + +const String paletteNames[paletteCount] = { + "Rainbow", + "Rainbow Stripe", + "Cloud", + "Lava", + "Ocean", + "Forest", + "Party", + "Heat", +}; + void loop(void) { // Add entropy to random number generator; we use a lot of it. random16_add_entropy(random(65535)); @@ -559,6 +600,12 @@ void loadSettings() { solidColor = CRGB(r, g, b); } + + currentPaletteIndex = EEPROM.read(5); + if (currentPaletteIndex < 0) + currentPaletteIndex = 0; + else if (currentPaletteIndex >= paletteCount) + currentPaletteIndex = paletteCount - 1; } void sendAll() @@ -572,6 +619,10 @@ void sendAll() json += "\"index\":" + String(currentPatternIndex); json += ",\"name\":\"" + patterns[currentPatternIndex].name + "\"}"; + json += ",\"currentPalette\":{"; + json += "\"index\":" + String(currentPaletteIndex); + json += ",\"name\":\"" + paletteNames[currentPaletteIndex] + "\"}"; + json += ",\"solidColor\":{"; json += "\"r\":" + String(solidColor.r); json += ",\"g\":" + String(solidColor.g); @@ -587,6 +638,15 @@ void sendAll() } json += "]"; + json += ",\"palettes\":["; + for (uint8_t i = 0; i < paletteCount; i++) + { + json += "\"" + paletteNames[i] + "\""; + if (i < paletteCount - 1) + json += ","; + } + json += "]"; + json += "}"; server.send(200, "text/json", json); @@ -610,6 +670,16 @@ void sendPattern() json = String(); } +void sendPalette() +{ + String json = "{"; + json += "\"index\":" + String(currentPaletteIndex); + json += ",\"name\":\"" + paletteNames[currentPaletteIndex] + "\""; + json += "}"; + server.send(200, "text/json", json); + json = String(); +} + void sendBrightness() { String json = String(brightness); @@ -663,8 +733,10 @@ void adjustPattern(bool up) if (currentPatternIndex >= patternCount) currentPatternIndex = 0; - EEPROM.write(1, currentPatternIndex); - EEPROM.commit(); + if (autoplay == 0) { + EEPROM.write(1, currentPatternIndex); + EEPROM.commit(); + } } void setPattern(int value) @@ -677,7 +749,23 @@ void setPattern(int value) currentPatternIndex = value; - EEPROM.write(1, currentPatternIndex); + if (autoplay == 0) { + EEPROM.write(1, currentPatternIndex); + EEPROM.commit(); + } +} + +void setPalette(int value) +{ + // don't wrap around at the ends + if (value < 0) + value = 0; + else if (value >= paletteCount) + value = paletteCount - 1; + + currentPaletteIndex = value; + + EEPROM.write(5, currentPaletteIndex); EEPROM.commit(); } @@ -748,7 +836,8 @@ void confetti() // random colored speckles that blink in and fade smoothly fadeToBlackBy( leds, NUM_LEDS, 10); int pos = random16(NUM_LEDS); - leds[pos] += CHSV( gHue + random8(64), 200, 255); + // leds[pos] += CHSV( gHue + random8(64), 200, 255); + leds[pos] += ColorFromPalette(palettes[currentPaletteIndex], gHue + random8(64)); } void sinelon() @@ -756,14 +845,15 @@ void sinelon() // a colored dot sweeping back and forth, with fading trails fadeToBlackBy( leds, NUM_LEDS, 20); int pos = beatsin16(13, 0, NUM_LEDS - 1); - leds[pos] += CHSV( gHue, 255, 192); + // leds[pos] += CHSV( gHue, 255, 192); + leds[pos] += ColorFromPalette(palettes[currentPaletteIndex], gHue, 192); } void bpm() { // colored stripes pulsing at a defined Beats-Per-Minute (BPM) uint8_t BeatsPerMinute = 62; - CRGBPalette16 palette = PartyColors_p; + CRGBPalette16 palette = palettes[currentPaletteIndex]; uint8_t beat = beatsin8( BeatsPerMinute, 64, 255); for ( int i = 0; i < NUM_LEDS; i++) { //9948 leds[i] = ColorFromPalette(palette, gHue + (i * 2), beat - gHue + (i * 10)); @@ -777,7 +867,8 @@ void juggle() byte dothue = 0; for ( int i = 0; i < 8; i++) { - leds[beatsin16(i + 7, 0, NUM_LEDS)] |= CHSV(dothue, 200, 255); + // leds[beatsin16(i + 7, 0, NUM_LEDS)] |= CHSV(dothue, 200, 255); + leds[beatsin16(i + 7, 0, NUM_LEDS)] |= ColorFromPalette(palettes[currentPaletteIndex], dothue); dothue += 32; } } From 020b0b0e4315bd43f10b87ee77288db56994d333 Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Thu, 23 Feb 2017 19:22:51 -0600 Subject: [PATCH 07/12] Fixed autoplay compile error. --- esp8266-fastled-webserver.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp8266-fastled-webserver.ino b/esp8266-fastled-webserver.ino index 48399d5..4005b59 100644 --- a/esp8266-fastled-webserver.ino +++ b/esp8266-fastled-webserver.ino @@ -733,7 +733,7 @@ void adjustPattern(bool up) if (currentPatternIndex >= patternCount) currentPatternIndex = 0; - if (autoplay == 0) { + if (autoplayEnabled) { EEPROM.write(1, currentPatternIndex); EEPROM.commit(); } @@ -749,7 +749,7 @@ void setPattern(int value) currentPatternIndex = value; - if (autoplay == 0) { + if (autoplayEnabled == 0) { EEPROM.write(1, currentPatternIndex); EEPROM.commit(); } From 407fd536c21e2d29d4c6e9770c2cfd63f2a028dd Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Fri, 5 May 2017 19:09:37 -0500 Subject: [PATCH 08/12] Fixed #25 (brightness not restored on startup) --- esp8266-fastled-webserver.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esp8266-fastled-webserver.ino b/esp8266-fastled-webserver.ino index 4005b59..793f350 100644 --- a/esp8266-fastled-webserver.ino +++ b/esp8266-fastled-webserver.ino @@ -113,6 +113,8 @@ void setup(void) { EEPROM.begin(512); loadSettings(); + FastLED.setBrightness(brightness); + irReceiver.enableIRIn(); // Start the receiver Serial.println(); From c17cea34268bc7e5457dc3edc0bcf49ad9bf9d18 Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Sat, 6 May 2017 11:30:15 -0500 Subject: [PATCH 09/12] Improved instructions. --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5f24ea0..635c2c9 100644 --- a/README.md +++ b/README.md @@ -30,22 +30,27 @@ Patterns are requested by the app from the ESP8266, so as new patterns are added The web app is stored in SPIFFS (on-board flash memory). -The web app is a single page app with separate files for js and css, using [jQuery](https://jquery.com) and [Bootstrap](http://getbootstrap.com). It has buttons for On/Off, a slider for brightness, a pattern selector, and a color picker (using [jQuery MiniColors](http://labs.abeautifulsite.net/jquery-minicolors)). Event handlers for the controls are wired up, so you don't have to click a 'Send' button after making changes. The brightness slider and the color picker use a delayed event handler, to prevent from flooding the ESP8266 web server with too many requests too quickly. - -The only drawback to SPIFFS that I've found so far is uploading the files is extremely slow, requiring several minutes, regardless of how large the files are. It's so slow that I've been just developing the web app and debugging locally on my desktop (with a hard-coded IP for the ESP8266), before uploading to SPIFFS and testing on the ESP8266. +The web app is a single page app that uses [jQuery](https://jquery.com) and [Bootstrap](http://getbootstrap.com). It has buttons for On/Off, a slider for brightness, a pattern selector, and a color picker (using [jQuery MiniColors](http://labs.abeautifulsite.net/jquery-minicolors)). Event handlers for the controls are wired up, so you don't have to click a 'Send' button after making changes. The brightness slider and the color picker use a delayed event handler, to prevent from flooding the ESP8266 web server with too many requests too quickly. +The only drawback to SPIFFS that I've found so far is uploading the files can be extremely slow, requiring several minutes, sometimes regardless of how large the files are. It can be so slow that I've been just developing the web app and debugging locally on my desktop (with a hard-coded IP for the ESP8266), before uploading to SPIFFS and testing on the ESP8266. Installing ----------- -These programs are installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. +The app is installed via the Arduino IDE which can be [downloaded here](https://www.arduino.cc/en/main/software). The ESP8266 boards will need to be added to the Arduino IDE which is achieved as follows. Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field. Click OK. Click Tools > Boards: ... > Boards Manager. Find and click on ESP8266 (using the Search function may expedite this). Click on Install. After installation, click on Close and then select your ESP8266 board from the Tools > Board: ... menu. -These programs depend on the FastLED LED animation library and the IRremoteESP8266 library. The FastLED library can be [downloaded from GitHub](https://github.com/FastLED/FastLED/releases) and placed in the Arduino 'libraries' folder or alternatively installed as [described here](https://www.arduino.cc/en/Guide/Libraries) by typing 'fastled' in the search filter box. The IRremoteESP8266 must be insalled manually by [downloading](https://github.com/markszabo/IRremoteESP8266) and placing the uncompressed folder in the Arduino 'libraries' folder. +The app depends on the following libraries. They must either be downloaded from GitHub and placed in the Arduino 'libraries' folder, or installed as [described here](https://www.arduino.cc/en/Guide/Libraries) by using the Arduino library manager. -Download the programs from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. +* [FastLED](https://github.com/FastLED/FastLED) +* [IRremoteESP8266](https://github.com/markszabo/IRremoteESP8266) +* [Arduino WebSockets](https://github.com/Links2004/arduinoWebSockets) + +Download the app code from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the [Arduino ESP8266FS tool](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system). -With ESP8266FS installed run the sketch and then upload the web app using `ESP8266 Sketch Data Upload` command in the Arduino Tools menu. +With ESP8266FS installed upload the web app using `ESP8266 Sketch Data Upload` command in the Arduino Tools menu. + +Then enter your wi-fi network SSID and password in the .ino file, and upload the sketch using the Upload button. Compression ----------- From 410186e6a548b1cf0530ed3f5b6ec07f966099c5 Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Thu, 22 Jun 2017 15:33:28 -0500 Subject: [PATCH 10/12] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 635c2c9..e8565c7 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The app is installed via the Arduino IDE which can be [downloaded here](https:// The app depends on the following libraries. They must either be downloaded from GitHub and placed in the Arduino 'libraries' folder, or installed as [described here](https://www.arduino.cc/en/Guide/Libraries) by using the Arduino library manager. * [FastLED](https://github.com/FastLED/FastLED) -* [IRremoteESP8266](https://github.com/markszabo/IRremoteESP8266) +* [IRremoteESP8266](https://github.com/sebastienwarin/IRremoteESP8266) * [Arduino WebSockets](https://github.com/Links2004/arduinoWebSockets) Download the app code from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. @@ -71,7 +71,7 @@ The firmware implements basic [RESTful web services](https://en.wikipedia.org/wi Infrared Remote Control ----------------------- -Control via infrared remote control is also supported, via the [ESP8266 port of the IRremote library](https://github.com/markszabo/IRremoteESP8266). +Control via infrared remote control is also supported, via the [ESP8266 port of the IRremote library](https://github.com/sebastienwarin/IRremoteESP8266). [Adafruit NeoPixel Ring]:https://www.adafruit.com/product/1586 [Adafruit HUZZAH ESP8266 Breakout]:https://www.adafruit.com/products/2471 From 350feed1917ed53b9a5fae7b02102162804440e2 Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Sat, 14 Oct 2017 12:47:30 -0500 Subject: [PATCH 11/12] Update README.md --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e8565c7..3974372 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,38 @@ Control an addressable LED strip with an ESP8266 via a web browser or infrared r Hardware -------- -An ESP8266 development board, such as the [Adafruit HUZZAH ESP8266 Breakout]: +##### ESP8266 development board + +[![Wemos D1 Mini Pro & Headers](https://ae01.alicdn.com/kf/HTB1P1KVaMsSMeJjSsphq6xuJFXah/WEMOS-D1-mini-Pro-V1-1-0-16M-bytes-external-antenna-connector-ESP8266-WIFI-Internet-of.jpg_200x200.jpg)](https://www.aliexpress.com/item/WEMOS-D1-mini-Pro-16M-bytes-external-antenna-connector-ESP8266-WIFI-Internet-of-Things-development-board/32724692514.html) + +[Wemos D1 Mini Pro & Headers](https://www.aliexpress.com/item/WEMOS-D1-mini-Pro-16M-bytes-external-antenna-connector-ESP8266-WIFI-Internet-of-Things-development-board/32724692514.html) + +or [![Adafruit HUZZAH ESP8266 Breakout](https://cdn-shop.adafruit.com/310x233/2471-10.jpg)](https://www.adafruit.com/products/2471) -Addressable LED strip, such as the [Adafruit NeoPixel Ring]: +[Adafruit HUZZAH ESP8266 Breakout](https://www.adafruit.com/products/2471) + +##### Addressable LED strip [![Adafruit NeoPixel Ring](https://www.adafruit.com/images/145x109/1586-00.jpg)](https://www.adafruit.com/product/1586) +[Adafruit NeoPixel Ring] + +Other hardware: + +* [3.3V to 5V Logic Level Shifter](http://www.digikey.com/product-detail/en/texas-instruments/SN74HCT245N/296-1612-5-ND/277258) (required if LEDs "glitch") + +Recommended by [Adafruit NeoPixel "Best Practices"](https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices) to help protect LEDs from current onrush: +* [1000µF Capacitor](http://www.digikey.com/product-detail/en/panasonic-electronic-components/ECA-1EM102/P5156-ND/245015) +* [300 to 500 Ohm resistor](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT470R/CF14JT470RCT-ND/1830342) + +Optional shield to make everything more tidy: + +[![Wemos D1 Mini ESP8266 LED & Level Shifter Shield](https://d3s5r33r268y59.cloudfront.net/13194/products/thumbs/2017-05-06T15:02:37.208Z-IMG_20170506_100623.jpg.114x76_q85_pad_rcrop.jpg)](https://www.tindie.com/products/jasoncoon/wemos-d1-mini-esp8266-led-and-level-shifter-shield/) + +[Wemos D1 Mini ESP8266 LED & Level Shifter Shield](https://www.tindie.com/products/jasoncoon/wemos-d1-mini-esp8266-led-and-level-shifter-shield) + Features -------- * Turn the NeoPixel Ring on and off From 432fbb95d9c58bd977ecce1fb90395ea38efd7a8 Mon Sep 17 00:00:00 2001 From: Jason Coon Date: Tue, 12 Dec 2017 13:36:45 -0600 Subject: [PATCH 12/12] Updated README, fixed Arduino ESP8266FS tool link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3974372..da1b541 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ The app depends on the following libraries. They must either be downloaded from Download the app code from GitHub using the green Clone or Download button from [the GitHub project main page](https://github.com/jasoncoon/esp8266-fastled-webserver) and click Download ZIP. Decompress the ZIP file in your Arduino sketch folder. -The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the [Arduino ESP8266FS tool](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system). +The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the [Arduino ESP8266FS tool](http://esp8266.github.io/Arduino/versions/2.3.0/doc/filesystem.html#uploading-files-to-file-system). With ESP8266FS installed upload the web app using `ESP8266 Sketch Data Upload` command in the Arduino Tools menu.