35#define CORKSCREW_TOTAL_HEIGHT \
38#define CORKSCREW_TURNS 19
42#define CORKSCREW_WIDTH 16
43#define CORKSCREW_HEIGHT 19
48 "Take a wooden walking stick, wrap dense LEDs around it like a corkscrew. "
49 "Super simple but very awesome looking."
50 "This assumes the dense 144 LEDs / meter.");
80 int num_leds =
args.num_leds;
81 float leds_per_turn =
args.leds_per_turn;
82 float width_cm =
args.width_cm;
84 const float circumference = leds_per_turn;
85 const float radius = circumference / (2.0 *
PI);
86 const float angle_per_led = 2.0 *
PI / leds_per_turn;
87 const float height_per_turn_cm = width_cm;
88 const float height_per_led = height_per_turn_cm / leds_per_turn *
91 for (
int i = 0; i < num_leds; i++) {
92 float angle = i * angle_per_led;
93 float r = radius + 10 + i * height_per_led;
96 float x = r * cos(angle);
97 float y = r * sin(angle);
159 stream <<
"Corkscrew Output:\n";
160 stream <<
"Width: " << output.
width <<
"\n";
161 stream <<
"Height: " << output.
height <<
"\n";
174 uint32_t now = millis();
198 for (
int i = 0; i <
NUM_LEDS; ++i) {
207 <<
" with color: " << c);
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
Base definition for an LED controller.
Corkscrew projection utilities.
void printOutput(const Corkscrew::Output &output)
UISlider ledsScale("Leds scale", 0.1f, 0.1f, 1.0f, 0.01f)
Corkscrew corkscrew(corkscrewInput)
Corkscrew::Input corkscrewInput(CORKSCREW_TOTAL_HEIGHT, CORKSCREW_TURNS *2.0f *PI, 0, NUM_LEDS,)
CLEDController * addController()
LedsXY< CORKSCREW_WIDTH, CORKSCREW_HEIGHT > frameBuffer
UITitle festivalStickTitle("Festival Stick")
#define CORKSCREW_TOTAL_HEIGHT
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.")
@ BGR
Blue, Green, Red (0210)
#define EVERY_N_MILLIS(N)
Checks whether to execute a block of code every N milliseconds.
void clear(CRGB(&arr)[N])
HeapVector< T, Allocator > vector
Implements a simple red square effect for 2D LED grids.
Functions to generate and fill arrays with noise.
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Representation of an RGB pixel (Red, Green, Blue)
UIButton button("Trigger")