-
Notifications
You must be signed in to change notification settings - Fork 4
/
Photons.h
30 lines (26 loc) · 823 Bytes
/
Photons.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef Photons_h
#define Photons_h
#include <Arduino.h>
#include <FastLED.h>
#include "AudioSensor.h"
#include "AudioTrigger.h"
#include "Fx.h"
#include "HarmonicMotion.h"
#include "State.h"
class Photons: public Fx {
private:
const CRGBPalette16 PALETTE = CRGBPalette16(CRGB::White, CRGB::Aqua, CRGB::Red, CRGB::Blue);
static constexpr double MIN_SPEED = 100;
static constexpr double MAX_SPEED = 1000;
static const uint8_t NUM_PHOTONS = 10;
static const uint8_t MAX_CONCURRENT = 3;
AudioTrigger *audioTrigger;
HarmonicMotion items[NUM_PHOTONS];
public:
Photons(Strip *strip, AudioChannel *audioChannel, State *state);
~Photons();
void resetItem(HarmonicMotion &item);
void reset();
void loop();
};
#endif