FastLED 3.9.15
Loading...
Searching...
No Matches
Chromancer.ino File Reference

Detailed Description

Hexagonal LED display visualization.

Definition in file Chromancer.ino.

#include "FastLED.h"
#include "fl/system/sketch_macros.h"
#include "fl/log/log.h"
#include "fl/stl/stdio.h"
#include "fl/math/screenmap.h"
#include "fl/math/math.h"
#include "fl/stl/json.h"
#include "fl/ui/ui.h"
#include "fl/stl/map.h"
#include "fl/stl/string.h"
#include "./screenmap.json.h"
#include "./mapping.h"
#include "./ripple.h"
#include "./detail.h"
+ Include dependency graph for Chromancer.ino:

Go to the source code of this file.

Macros

#define autoPulseChangeTime   30000
 
#define autoPulseTimeout    5000
 
#define cubePulsesEnabled   true
 
#define gyroAlpha   0.9
 
#define gyroThreshold    300
 
#define heartbeatDelta   300
 
#define heartbeatLockout    500
 
#define highTemperature   37.0
 
#define lowTemperature   33.0
 
#define numberOfRipples   30
 
#define randomPulsesEnabled   true
 
#define randomPulseTime   2000
 
#define simulatedEdaBaseTime   1000
 
#define simulatedEdaVariance   10000
 
#define simulatedHeartbeatBaseTime    600
 
#define simulatedHeartbeatVariance    200
 

Enumerations

enum  { BlackStrip = 0 , GreenStrip = 1 , RedStrip = 2 , BlueStrip = 3 }
 

Functions

fl::UIDescription description ("Take 6 seconds to boot up. Chromancer is a wall-mounted hexagonal LED display that originally reacted to biometric data from an EmotiBit sensor. It visualizes your heartbeat, skin temperature, and movement in real-time. Chromancer also has a few built-in effects that can be triggered with the push of a button. Enjoy!")
 
bool isNodeOnBorder (byte node)
 
void loop ()
 
void setup ()
 

Variables

fl::UICheckbox allWhite ("All White", false)
 
fl::UIGroup automationControls ("Automation", starburstPulsesEnabled, simulatedBiometricsEnabled)
 
byte currentAutoPulseType = 255
 
fl::UIGroup displayControls ("Display", sliderDecay, allWhite)
 
fl::UIGroup effectTriggers ("Effect Triggers", simulatedHeartbeat, triggerStarburst, triggerRainbowCube, triggerBorderWave, triggerSpiral)
 
float gyroX
 
float gyroY
 
float gyroZ
 
float highestIrReading
 
unsigned long lastAutoPulseChange
 
byte lastAutoPulseNode = 255
 
unsigned long lastHeartbeat
 
float lastIrReading
 
float lastKnownTemperature
 
unsigned long lastRandomPulse
 
byte ledColors [40][14][3]
 
CRGBleds [] = {leds0, leds1, leds2, leds3}
 
CRGB leds0 [lengths[BlackStrip]] = {}
 
CRGB leds1 [lengths[GreenStrip]] = {}
 
CRGB leds2 [lengths[RedStrip]] = {}
 
CRGB leds3 [lengths[BlueStrip]] = {}
 
constexpr int lengths []
 
unsigned long nextSimulatedEda
 
unsigned long nextSimulatedHeartbeat
 
byte numberOfAutoPulseTypes
 
Ripple ripples [numberOfRipples]
 
fl::UICheckbox simulatedBiometricsEnabled ("Simulated Biometrics", true)
 
fl::UIButton simulatedHeartbeat ("Simulated Heartbeat")
 
fl::UISlider sliderDecay ("decay",.97f,.8, 1.0,.01)
 
fl::UICheckbox starburstPulsesEnabled ("Starburst Pulses", true)
 
fl::UITitle title ("Chromancer")
 
fl::UIButton triggerBorderWave ("Border Wave")
 
fl::UIButton triggerRainbowCube ("Rainbow Cube")
 
fl::UIButton triggerSpiral ("Spiral Wave")
 
fl::UIButton triggerStarburst ("Trigger Starburst")
 
bool wasBorderWaveClicked = false
 
bool wasHeartbeatClicked = false
 
bool wasRainbowCubeClicked = false
 
bool wasSpiralClicked = false
 
bool wasStarburstClicked = false