Skip to content

Commit 5f14088

Browse files
Googly Eyes: adjust constants, Audio Spectrum: add comment re FFT library
1 parent d2ac0e2 commit 5f14088

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

EyeLights_Audio_Spectrum/EyeLights_Audio_Spectrum.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
AUDIO SPECTRUM LIGHT SHOW for Adafruit EyeLights (LED Glasses + Driver).
33
Uses onboard microphone and a lot of math to react to music.
4+
REQUIRES Adafruit_ZeroFFT LIBRARY, install via Arduino Library manager.
45
*/
56

67
#include <Adafruit_IS31FL3741.h> // For LED driver

EyeLights_Googly_Rings/EyeLights_Googly_Rings.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public:
2323
// so rings don't spin in perfect lockstep.
2424
angle = random(1000);
2525
momentum = 0.0;
26-
friction = 0.9 + random(500) * 0.0001; // Inverse friction, really
26+
friction = 0.94 + random(300) * 0.0001; // Inverse friction, really
2727
}
2828

2929
// Given a pixel index (0-23) and a scaling factor (0.0-1.0),
@@ -41,9 +41,9 @@ public:
4141
// physics simulation and render the corresponding LED ring.
4242
void iterate(sensors_event_t &event) {
4343
// Minus here is because LED pixel indices run clockwise vs. trigwise.
44-
// 0.004 is just an empirically-derived scaling fudge factor that looks
44+
// 0.006 is just an empirically-derived scaling fudge factor that looks
4545
// good; smaller values for more sluggish rings, higher = more twitch.
46-
momentum = momentum * friction - 0.004 *
46+
momentum = momentum * friction - 0.006 *
4747
(cos(angle) * event.acceleration.z +
4848
sin(angle) * event.acceleration.x);
4949
angle += momentum;

0 commit comments

Comments
 (0)