FastLED 3.9.15
Loading...
Searching...
No Matches
FxNoiseRing.h File Reference
#include <Arduino.h>
#include <FastLED.h>
#include "fl/json.h"
#include "fl/math_macros.h"
#include "fl/warn.h"
#include "noisegen.h"
#include "fl/screenmap.h"
#include "fl/slice.h"
#include "fl/ui.h"
#include "sensors/pir.h"
#include "./simple_timer.h"
#include "fl/sstream.h"
#include "fl/assert.h"
+ Include dependency graph for FxNoiseRing.h:

Go to the source code of this file.

Classes

class  ColorPaletteManager
 
class  NoiseVariantManager
 
struct  PlasmaParams
 
class  PlasmaWaveGenerator
 
struct  PlasmaWaveGenerator::WaveSource
 
struct  RingCoord
 
class  RingLUT
 

Macros

#define COLOR_ORDER   GRB
 
#define LED_PIN   2
 
#define NUM_LEDS   250
 
#define PIN_PIR   0
 
#define PIR_FALLING_TIME   1000
 
#define PIR_LATCH_MS   60000
 
#define PIR_RISING_TIME   1000
 

Functions

UICheckbox autoCycle ("Auto Cycle Effects", true)
 
UICheckbox autoPalette ("Auto Cycle Palettes", true)
 
UISlider brightness ("Brightness", 1, 0, 1)
 
RingCoord calculateRingCoord (int led_index, int num_leds, float time_offset=0.0f)
 
void draw (uint32_t now)
 
CRGB drawBinaryPulse (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawCosmicSwirl (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawDigitalRain (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawElectricStorm (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawFireDance (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawGlitchCity (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawLavaLamp (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawNebulaDrift (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
CRGB drawOceanDepths (const RingCoord &coord, uint32_t time_ms, ColorPaletteManager &palette)
 
uint8_t getPaletteIndex (const fl::string &name)
 
uint8_t getVariantIndex (const fl::string &name)
 
void loop ()
 
UIDropdown palettes ("Color Palettes", palette_names)
 
Pir pir (PIN_PIR, PIR_LATCH_MS, PIR_RISING_TIME, PIR_FALLING_TIME)
 
UISlider scale ("Scale", 4,.1, 4,.1)
 
void setup ()
 
UISlider timeBitshift ("Time Bitshift", 5, 0, 16, 1)
 
UISlider timescale ("Time Scale", 1,.1, 10,.1)
 
UICheckbox useDither ("Use Binary Dither", true)
 
NoiseVariantManager variant_manager (palette_manager)
 
UIDropdown variants ("Noise Variants", variant_names)
 

Variables

CLEDControllercontroller = nullptr
 
float current_brightness = 0
 
CRGB leds [NUM_LEDS]
 
ColorPaletteManager palette_manager
 
fl::string palette_names [5]
 
RingLUT ring_lut
 
Timer timer
 
fl::string variant_names [10]
 

Class Documentation

◆ PlasmaParams

struct PlasmaParams
Class Members
float brightness = 1.0f
uint8_t hue_offset = 0
float noise_amplitude = 0.8f
float noise_intensity = 0.5f
uint8_t time_bitshift = 5
float time_scale = 1.0f

◆ PlasmaWaveGenerator::WaveSource

struct PlasmaWaveGenerator::WaveSource
Class Members
float amplitude
float frequency
float phase_speed
float x
float y

◆ RingCoord

struct RingCoord
Class Members
float angle
int led_index
float radius
float x
float y