alles klar nun, im die variablen müssen auch im Constructor initialisiert werden.
// .*h
#ifndef WS2801_M_h
#define WS2801_M_h
#include <Arduino.h>
#define pixel 31
class WS2801_M{
private:
uint8_t _red;
uint8_t _green;
uint8_t _blue;
public:
WS2801_M()
{
_red = 0;
_blue = 0;
_green = 0;
};
// ++++++++++++++++++ Struct ++++++++++++++++++++++++++++
struct color {
uint8_t red;
uint8_t green;
uint8_t blue;
};
// ++++++++++++++++++ raising edge ++++++++++++++++++++++++
void Off(color* buf);
// ++++++++++++++++++++++ GLOW PIXEL ++++++++++++++++++++
void Glow(color* buf, bool res, bool trig);
};
#endif