39 "Take a wooden walking stick, wrap dense LEDs around it like a corkscrew. Super simple but very awesome looking. "
40 "This classic version uses 3D Perlin noise to create organic, flowing patterns around the cylindrical surface. "
41 "Assumes dense 144 LEDs/meter (288 total LEDs).");
68 int num_leds =
args.num_leds;
69 float leds_per_turn =
args.leds_per_turn;
70 float width_cm =
args.width_cm;
72 const float circumference = leds_per_turn;
73 const float radius = circumference / (2.0 *
FL_PI);
74 const float angle_per_led = 2.0 *
FL_PI / leds_per_turn;
75 const float total_angle_radians = angle_per_led * num_leds;
76 const float total_turns = total_angle_radians / (2.0 *
FL_PI);
77 const float height_per_turn_cm = width_cm;
78 const float height_per_led =
81 const float total_height =
82 height_per_turn_cm * total_turns;
84 for (
int i = 0; i < num_leds; i++) {
85 float angle = i * angle_per_led;
86 float height = (i / leds_per_turn) * height_per_turn_cm;
94 vec3f led_position(
x,
y,
z);
106 int num_leds =
args.num_leds;
107 float leds_per_turn =
args.leds_per_turn;
108 float width_cm =
args.width_cm;
111 const float circumference = leds_per_turn;
112 const float radius = circumference / (2.0 *
FL_PI);
113 const float angle_per_led = 2.0 *
FL_PI / leds_per_turn;
114 const float height_per_turn_cm = width_cm;
115 const float height_per_led =
121 for (
int i = 0; i < num_leds; i++) {
122 float angle = i * angle_per_led;
123 float r = radius + 10 + i * height_per_led;
130 points[i] = vec2f(
x,
y);
133 FL_WARN(
"Creating fl::ScreenMap with:\n" << points);
193 for (
int i = 0; i <
NUM_LEDS; i++) {
206 uint8_t
brightness = map(noise_value, 0, 65535, 0, 255);
208 uint8_t sat = int32_t((
x * 10 +
y * 5 + now / 5)) % 256;
215 uint32_t now = millis();
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
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.
fl::ScreenMap makeScreenMap()
CLEDController * controller
void push_back(const T &value) FL_NOEXCEPT
fl::CLEDController CLEDController
fl::u16 inoise16(fl::u32 x, fl::u32 y, fl::u32 z, fl::u32 t)
Centralized logging categories for FastLED hardware interfaces and subsystems.
void clear(CRGB(&arr)[N])
enable_if< is_fixed_point< T >::value, T >::type cos(T angle) FL_NOEXCEPT
enable_if< is_fixed_point< T >::value, T >::type sin(T angle) FL_NOEXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NOEXCEPT
fl::vector< vec3f > makeCorkScrew(corkscrew_args args=corkscrew_args())
fl::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).")
fl::UIButton button("Button")
void showGenerative(uint32_t now)
CLEDController * addController()
fl::vector< vec3f > mapCorkScrew
fl::UITitle festivalStickTitle("Festival Stick - Classic Version")
fl::UISlider ledsScale("Leds scale", 0.1f, 0.1f, 1.0f, 0.01f)
Representation of an 8-bit RGB pixel (Red, Green, Blue)