Skip to content
Snippets Groups Projects
Commit e43d8b7d authored by Orhan-Timo Altan's avatar Orhan-Timo Altan
Browse files

.

parent 5a0558b1
No related branches found
No related tags found
No related merge requests found
#include <ledstrip.h> #include <ledstrip.h>
// Ledstrip front_strip(6,35); Ledstrip front_strip(6,33);
// Ledstrip back_strip(6,37); Ledstrip back_strip(6,37);
// Ledstrip left_strip(3, 33); Ledstrip left_strip(3, 35);
// Ledstrip rigth_strip(3, 39);
Ledstrip front_strip(13, 37);
Ledstrip back_strip(24, 35);
Ledstrip left_strip(3, 33);
Ledstrip rigth_strip(3, 39); Ledstrip rigth_strip(3, 39);
bool state = true; bool state = true;
......
...@@ -31,6 +31,16 @@ void Ledstrip::show() { ...@@ -31,6 +31,16 @@ void Ledstrip::show() {
ptrStrip->show(); ptrStrip->show();
} }
uint32_t Ledstrip::color_hsv(int pixelHue) {
pixelHue = ptrStrip->ColorHSV(pixelHue);
return pixelHue;
}
uint32_t Ledstrip::gamma(int pixelHue) {
pixelHue = ptrStrip->gamma32(color_hsv(pixelHue));
return pixelHue;
}
void Ledstrip::blink(uint32_t color, unsigned long wait_time) { void Ledstrip::blink(uint32_t color, unsigned long wait_time) {
ptrStrip->clear(); ptrStrip->clear();
set_pixel_color(color); set_pixel_color(color);
......
...@@ -27,6 +27,8 @@ class Ledstrip { ...@@ -27,6 +27,8 @@ class Ledstrip {
void set_pixel_color(uint16_t index, uint32_t color); void set_pixel_color(uint16_t index, uint32_t color);
void set_pixel_color(uint16_t index, uint16_t amount, uint32_t color); void set_pixel_color(uint16_t index, uint16_t amount, uint32_t color);
void show(); void show();
uint32_t color_hsv(int pixelHue);
uint32_t gamma(int pixelHue);
void blink(uint32_t color, unsigned long wait_time); void blink(uint32_t color, unsigned long wait_time);
void rainbow_effect(unsigned long wait_time); void rainbow_effect(unsigned long wait_time);
void running_light(unsigned long wait_time = 100, uint8_t length = 2, uint32_t color = 50, bool direction= true); void running_light(unsigned long wait_time = 100, uint8_t length = 2, uint32_t color = 50, bool direction= true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment