40 "Take a wooden walking stick, wrap dense LEDs around it like a corkscrew. Super simple but very awesome looking. "
41 "This classic version uses 3D Perlin noise to create organic, flowing patterns around the cylindrical surface. "
42 "Assumes dense 144 LEDs/meter (288 total LEDs).");
69 int num_leds =
args.num_leds;
70 float leds_per_turn =
args.leds_per_turn;
71 float width_cm =
args.width_cm;
73 const float circumference = leds_per_turn;
74 const float radius = circumference / (2.0 *
PI);
75 const float angle_per_led = 2.0 *
PI / leds_per_turn;
76 const float total_angle_radians = angle_per_led * num_leds;
77 const float total_turns = total_angle_radians / (2.0 *
PI);
78 const float height_per_turn_cm = width_cm;
79 const float height_per_led =
82 const float total_height =
83 height_per_turn_cm * total_turns;
85 for (
int i = 0; i < num_leds; i++) {
86 float angle = i * angle_per_led;
87 float height = (i / leds_per_turn) * height_per_turn_cm;
90 float x = radius * cos(angle);
91 float z = radius * sin(angle);
107 int num_leds =
args.num_leds;
108 float leds_per_turn =
args.leds_per_turn;
109 float width_cm =
args.width_cm;
112 const float circumference = leds_per_turn;
113 const float radius = circumference / (2.0 *
PI);
114 const float angle_per_led = 2.0 *
PI / leds_per_turn;
115 const float height_per_turn_cm = width_cm;
116 const float height_per_led =
122 for (
int i = 0; i < num_leds; i++) {
123 float angle = i * angle_per_led;
124 float r = radius + 10 + i * height_per_led;
127 float x = r * cos(angle);
128 float y = r * sin(angle);
194 for (
int i = 0; i <
NUM_LEDS; i++) {
207 uint8_t
brightness = map(noise_value, 0, 65535, 0, 255);
209 uint8_t sat = int32_t((
x * 10 +
y * 5 + now / 5)) % 256;
216 uint32_t now = millis();
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
central include file for FastLED, defines the CFastLED class/object
ScreenMap makeScreenMap()
CLEDController * controller
UISlider brightness("Brightness", 128, 0, 255, 1)
Base definition for an LED controller.
void push_back(const T &value)
uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z, uint32_t t)
16-bit, fixed point implementation of Perlin's noise.
void clear(CRGB(&arr)[N])
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
@ BGR
Blue, Green, Red (0210)
HeapVector< T, Allocator > vector
Functions to generate and fill arrays with noise.
fl::vector< vec3f > makeCorkScrew(corkscrew_args args=corkscrew_args())
UIButton button("Button")
UISlider ledsScale("Leds scale", 0.1f, 0.1f, 1.0f, 0.01f)
void showGenerative(uint32_t now)
CLEDController * addController()
UITitle festivalStickTitle("Festival Stick - Classic Version")
fl::vector< vec3f > mapCorkScrew
UIDescription festivalStickDescription("Take a wooden walking stick, wrap dense LEDs around it like a corkscrew. Super simple but very awesome looking. " "This classic version uses 3D Perlin noise to create organic, flowing patterns around the cylindrical surface. " "Assumes dense 144 LEDs/meter (288 total LEDs).")
UISlider brightness("Brightness", 16, 0, 255, 1)
Representation of an RGB pixel (Red, Green, Blue)
Representation of an HSV pixel (hue, saturation, value (aka brightness)).