og farbschema

This commit is contained in:
polloka 2022-06-27 21:46:26 +02:00
parent 7d19b90cba
commit 68f4509843
2 changed files with 8 additions and 13 deletions

View File

@ -6,7 +6,7 @@
#include "zauberstab.h"
#undef NUM_LEDS
#define NUM_LEDS 45
#define NUM_LEDS 48
#define SAMPLING_FREQUENCY_BP 40 // number of energy chunks per second
#define SAMPLING_FREQUENCY_CONTROL \
@ -113,7 +113,6 @@ void BeatDetectApp::loop()
if (micros() - last_us_bp > sampling_period_bp)
{
n_samples = 0;
last_us_bp = micros();
// energy_fil += (energy - energy_fil) * 0.01;
@ -132,8 +131,6 @@ void BeatDetectApp::loop()
// y_fil[i] += (abs(y[i]) - y_fil[i]) * 0.005; //linie der
// scheitelpunkte
}
@ -183,16 +180,14 @@ void BeatDetectApp::loop()
for (int i = 0; i < NUM_LEDS; i++)
{
//leds[i].g = get_value(i, pos_target_filtered);
//leds[i].r = get_value(i, pos_target_filtered + 2);
//leds[i].b = get_value(i, pos_target_filtered - 2);
leds[i].g = get_value(i, pos_target_filtered);
leds[i].r = 0; //get_value(i, pos_target_filtered + 2);
leds[i].g = get_value(i, pos_target_filtered + 2);
leds[i].r = 0;//get_value(i, pos_target_filtered + 2);
leds[i].r = get_value(i, pos_target_filtered + 2);
leds[i].b = get_value(i, pos_target_filtered - 2);
//leds[i].g = get_value(i, pos_target_filtered);
//leds[i].g = get_value(i, pos_target_filtered + 2);
//leds[i].b = get_value(i, pos_target_filtered - 2);
}
FastLED.show();
}

View File

@ -95,8 +95,8 @@ void FackelApp::init()
for (int i = 0; i < 128; i++)
{
uint8_t r, g, b;
//hsl_to_rgb(i / 5, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b);
hsl_to_rgb(i / 5 + 180, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b);
hsl_to_rgb(i / 5, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b);
//hsl_to_rgb(i / 5 + 180, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b);
g = g == 1 ? 0 : g;
b = b == 1 ? 0 : b;
palette[i].r = r;