Commit 9b764da9 authored by Eric Duminil's avatar Eric Duminil
Browse files

Breathing offset

parent efc613be
......@@ -176,10 +176,10 @@ namespace LedEffects {
if (!config::night_mode) {
static uint16_t breathing_offset = 0;
uint16_t brightness = config::min_brightness
+ pixels.sine8(breathing_offset * 3) * config::brightness_amplitude / 255;
+ pixels.sine8(breathing_offset) * config::brightness_amplitude / 255;
pixels.setBrightness(brightness);
pixels.show();
breathing_offset++;
breathing_offset += 3; // breathing speed. +3 looks like slow human breathing.
}
delay(co2 > 1600 ? 50 : 100); // faster breathing for higher CO2 values
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment