Skip to content

Commit cb41371

Browse files
committed
Enable timeClient updates.
Enabled noise patterns. Fixed rotation of analog clock pattern for standard assembled acrylic case orientation. Fixed noise patterns crashing for >255 LEDs.
1 parent ed440d4 commit cb41371

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

Map.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ void drawAnalogClock() {
222222
static uint8_t secondAngle = 255 - second * degreesPerSecond;
223223

224224
EVERY_N_MILLIS(100) {
225-
hourAngle = 255 - hour * degreesPerHour;
226-
minuteAngle = 255 - minute * degreesPerMinute;
227-
secondAngle = 255 - second * degreesPerSecond;
225+
hourAngle = 64 - hour * degreesPerHour;
226+
minuteAngle = 64 - minute * degreesPerMinute;
227+
secondAngle = 64 - second * degreesPerSecond;
228228
}
229229

230230
fadeToBlackBy(leds, NUM_LEDS, clockBackgroundFade);

Noise.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ void SetupBlackAndBlueStripedPalette()
8989

9090
void drawNoise(CRGBPalette16 palette, uint8_t hueReduce = 0)
9191
{
92-
for (uint8_t i = 0; i < NUM_LEDS; i++) {
93-
uint8_t x = coordsX[i];
94-
uint8_t y = coordsY[i];
92+
for (uint16_t i = 0; i < NUM_LEDS; i++) {
93+
uint16_t x = coordsX[i];
94+
uint16_t y = coordsY[i];
9595

9696
int xoffset = noisescale * x;
9797
int yoffset = noisescale * y;

esp8266-fastled-webserver.ino

+15-15
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ESP8266WebServer webServer(80);
5555
//WebSocketsServer webSocketsServer = WebSocketsServer(81);
5656
ESP8266HTTPUpdateServer httpUpdateServer;
5757

58-
const long utcOffsetInSeconds = -5 * 60 * 60;
58+
const long utcOffsetInSeconds = -6 * 60 * 60;
5959

6060
// Define NTP Client to get time
6161
WiFiUDP ntpUDP;
@@ -176,7 +176,7 @@ typedef PatternAndName PatternAndNameList[];
176176
#include "Twinkles.h"
177177
#include "TwinkleFOX.h"
178178
#include "Map.h"
179-
//#include "Noise.h"
179+
#include "Noise.h"
180180
#include "Pacifica.h"
181181
#include "PacificaFibonacci.h"
182182
#include "PridePlayground.h"
@@ -219,18 +219,18 @@ PatternAndNameList patterns = {
219219
{ yGradientPalette, "Y Axis Gradient Palette" },
220220
{ xyGradientPalette, "XY Axis Gradient Palette" },
221221

222-
// // noise patterns
223-
// { fireNoise, "Fire Noise" },
224-
// { fireNoise2, "Fire Noise 2" },
225-
// { lavaNoise, "Lava Noise" },
226-
// { rainbowNoise, "Rainbow Noise" },
227-
// { rainbowStripeNoise, "Rainbow Stripe Noise" },
228-
// { partyNoise, "Party Noise" },
229-
// { forestNoise, "Forest Noise" },
230-
// { cloudNoise, "Cloud Noise" },
231-
// { oceanNoise, "Ocean Noise" },
232-
// { blackAndWhiteNoise, "Black & White Noise" },
233-
// { blackAndBlueNoise, "Black & Blue Noise" },
222+
// noise patterns
223+
{ fireNoise, "Fire Noise" },
224+
{ fireNoise2, "Fire Noise 2" },
225+
{ lavaNoise, "Lava Noise" },
226+
{ rainbowNoise, "Rainbow Noise" },
227+
{ rainbowStripeNoise, "Rainbow Stripe Noise" },
228+
{ partyNoise, "Party Noise" },
229+
{ forestNoise, "Forest Noise" },
230+
{ cloudNoise, "Cloud Noise" },
231+
{ oceanNoise, "Ocean Noise" },
232+
{ blackAndWhiteNoise, "Black & White Noise" },
233+
{ blackAndBlueNoise, "Black & Blue Noise" },
234234

235235
{ drawAnalogClock, "Analog Clock" },
236236

@@ -577,7 +577,7 @@ void loop() {
577577
webServer.handleClient();
578578
MDNS.update();
579579

580-
// timeClient.update();
580+
timeClient.update();
581581

582582
static bool hasConnected = false;
583583
EVERY_N_SECONDS(1) {

0 commit comments

Comments
 (0)