aboutsummaryrefslogtreecommitdiff
path: root/software/effects.ino
diff options
context:
space:
mode:
Diffstat (limited to 'software/effects.ino')
-rw-r--r--software/effects.ino14
1 files changed, 13 insertions, 1 deletions
diff --git a/software/effects.ino b/software/effects.ino
index 0600095..02a56e9 100644
--- a/software/effects.ino
+++ b/software/effects.ino
@@ -1,11 +1,23 @@
+#include "software.h"
#include "effects.h"
void fx_roundabout (unsigned long relative_time, bool (*leds)[64]) {
+ unsigned long segment_time = SLIDESHOW_DURATION / 64;
+ memset(led_state, 0, sizeof(led_state));
+ led_state[(relative_time / segment_time) % 64] = 1;
+
+ return;
+}
+
+void fx_wipexyz (unsigned long relative_time, bool (*leds)[64]) {
+ bool flip_state = (relative_time % 1000) > 500;
+ for(int i = 0; i < 64; i++) led_state[i] = i % 2 == flip_state;
+
return;
}
void ( * slideshow_effects [SLIDESHOW_SIZE] )( unsigned long relative_time, bool (*leds)[64] ) = {
fx_roundabout,
-// fx_wipexyz,
+ fx_wipexyz,
// fx_rainfall
};