FastLED 3.10.6
Loading...
Searching...
No Matches
MoodRing.ino File Reference

Detailed Description

A ring that listens to the room and lights the room back.

Definition in file MoodRing.ino.

#include "FastLED.h"
#include "fl/audio/audio_processor.h"
#include "fl/stl/stdio.h"
#include "fl/ui/ui.h"
#include "auto_brightness.h"
#include "mood_painter.h"
#include "ring_screenmap.h"
#include "room_sense.h"
+ Include dependency graph for MoodRing.ino:

Go to the source code of this file.

Macros

#define BRIGHTNESS   8
 
#define FASTLED_ESP32_USE_CLOCKLESS_SPI
 
#define GRID_HEIGHT   16
 
#define GRID_WIDTH   16
 
#define LED_DIAMETER   0.15f
 
#define NUM_LEDS   244
 
#define PIN_DATA   3
 

Functions

static void applyUiTuning ()
 
fl::UIDescription description ("A ring that listens to the room and lights the room back. Grant mic " "access, or drag in a .wav.")
 
 FASTLED_TITLE ("MoodRing")
 
void loop ()
 
static void printSense (const mood_ring::RoomSense &s)
 
void setup ()
 

Variables

fl::UIAudio audio ("Audio Input")
 
fl::UICheckbox autoBrightness ("Auto Brightness", true)
 
fl::UISlider autoBrightnessHighThreshold ("Auto Brightness High Threshold", 22, 0, 100, 1)
 
fl::UISlider autoBrightnessLowThreshold ("Auto Brightness Low Threshold", 8, 0, 100, 1)
 
fl::UISlider autoBrightnessMax ("Auto Brightness Max", 84, 0, 255, 1)
 
fl::UISlider breathGain ("Layer: Breath", 1.0f, 0.0f, 1.0f, 0.05f)
 
fl::UISlider brightness ("Brightness", BRIGHTNESS, 0, 255, 1)
 
fl::UICheckbox debugPrint ("Debug: Print Sense", false)
 
fl::UISlider flowGain ("Layer: Flow", 1.0f, 0.0f, 1.0f, 0.05f)
 
bool gAutoPump = false
 
fl::shared_ptr< mood_ring::RoomListener > gListener
 
mood_ring::MoodPainter gPainter
 
fl::shared_ptr< fl::audio::Processor > gProcessor
 
fl::UISlider grooveAttackMs ("Trust A Beat After (ms)", 800, 100, 4000, 50)
 
fl::UISlider grooveEnter ("Groove Enter Confidence", 0.60f, 0.1f, 1.0f, 0.01f)
 
fl::UISlider grooveExit ("Groove Exit Confidence", 0.35f, 0.0f, 0.9f, 0.01f)
 
fl::UISlider grooveGain ("Layer: Groove", 1.0f, 0.0f, 1.0f, 0.05f)
 
CRGB leds [NUM_LEDS]
 
fl::UICheckbox listen ("Listen", true)
 
fl::UISlider presenceReleaseMs ("Settle Into Calm (ms)", 900, 200, 4000, 50)
 
fl::UISlider pulseOrigin ("Pulse Origin (turns)", 0.0f, 0.0f, 1.0f, 0.01f)
 
fl::UICheckbox pulses ("Beat Pulses", true)
 
fl::UISlider punchGain ("Punch Gain", 1.5f, 0.0f, 3.0f, 0.05f)
 
fl::ScreenMap screenmap
 
fl::UISlider trailOverride ("Trail Keep Override", -1.0f, -1.0f, 0.98f, 0.02f)
 
fl::UICheckbox trails ("Trails", true)