2019-05-29 22:49:54 +00:00
|
|
|
#include "Effect.h"
|
|
|
|
#include "functions.h"
|
|
|
|
#include "effect_bell.h"
|
|
|
|
#include "sprites.h"
|
|
|
|
|
2019-10-01 04:29:32 +00:00
|
|
|
void BellEffect::loop(uint16_t ms) {
|
2019-05-29 22:49:54 +00:00
|
|
|
Serial.println("This is Bell.loop()");
|
|
|
|
for (int y = 0; y < 16; y++) {
|
2019-06-07 04:24:16 +00:00
|
|
|
for (int x = 0; x < 2; x++) {
|
|
|
|
for (int z = 0; z < 8; z++) {
|
|
|
|
leds[XYsafe(x * 8 + z, y)] = (sprite_bell[y * 2 + x] >> (7 - z) & 1) ^ invert ? color_on : color_off;
|
|
|
|
}
|
2019-05-29 22:49:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
EVERY_N_MILLISECONDS(300) {
|
2019-06-07 04:24:16 +00:00
|
|
|
invert = !invert;
|
2019-05-29 22:49:54 +00:00
|
|
|
}
|
|
|
|
}
|