40 "Take a wooden walking stick, wrap dense LEDs around it like a corkscrew. Super simple but very awesome looking."
41 "This assumes the dense 144 LEDs / meter.");
61 int num_leds =
args.num_leds;
62 float leds_per_turn =
args.leds_per_turn;
63 float width_cm =
args.width_cm;
65 const float circumference = leds_per_turn;
66 const float radius = circumference / (2.0 *
PI);
67 const float angle_per_led = 2.0 *
PI / leds_per_turn;
68 const float total_angle_radians = angle_per_led * num_leds;
69 const float total_turns = total_angle_radians / (2.0 *
PI);
70 const float height_per_turn_cm = width_cm;
71 const float height_per_led =
74 const float total_height =
75 height_per_turn_cm * total_turns;
77 for (
int i = 0; i < num_leds; i++) {
78 float angle = i * angle_per_led;
79 float height = (i / leds_per_turn) * height_per_turn_cm;
82 float x = radius * cos(angle);
83 float z = radius * sin(angle);
99 int num_leds =
args.num_leds;
100 float leds_per_turn =
args.leds_per_turn;
101 float width_cm =
args.width_cm;
104 const float circumference = leds_per_turn;
105 const float radius = circumference / (2.0 *
PI);
106 const float angle_per_led = 2.0 *
PI / leds_per_turn;
107 const float height_per_turn_cm = width_cm;
108 const float height_per_led =
114 for (
int i = 0; i < num_leds; i++) {
115 float angle = i * angle_per_led;
116 float r = radius + 10 + i * height_per_led;
119 float x = r * cos(angle);
120 float y = r * sin(angle);
184 for (
int i = 0; i <
NUM_LEDS; i++) {
197 uint8_t
brightness = map(noise_value, 0, 65535, 0, 255);
199 uint8_t sat = int32_t((
x * 10 +
y * 5 + now / 5)) % 256;
206 uint32_t now = millis();
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()
UISlider brightness("Brightness", 255, 0, 255, 1)
CLEDController * controller
Base definition for an LED controller.
void push_back(const T &value)
UISlider ledsScale("Leds scale", 0.1f, 0.1f, 1.0f, 0.01f)
@ BGR
Blue, Green, Red (0210)
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)
HeapVector< T, Allocator > vector
Implements a simple red square effect for 2D LED grids.
Functions to generate and fill arrays with noise.
fl::vector< vec3f > makeCorkScrew(corkscrew_args args=corkscrew_args())
UISlider ledsScale("Leds scale", 0.1f, 0.1f, 1.0f, 0.01f)
void showGenerative(uint32_t now)
UIDescription festivalStickDescription("Take a wooden walking stick, wrap dense LEDs around it like a corkscrew. Super simple but very awesome looking." "This assumes the dense 144 LEDs / meter.")
CLEDController * addController()
fl::vector< vec3f > mapCorkScrew
UITitle festivalStickTitle("Festival Stick")
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Representation of an RGB pixel (Red, Green, Blue)
UIButton button("Trigger")