Code: Select all
//creates the class "strip" at the begin code
NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(EEPROM.read(MNPIXEL), PinNeoPixel);
....
void setup ()
{
EEPROM.begin ();
strip.Begin ();
}
void loop {}......
The issue is when i declare the class, can´t read the eeprom, cause, it isnt initialized yet, but i cant declare the class into "setup", after eeprom.begin (), cause this must be a global class. I need to be able to read the eeprom during global class and variables declaration or bypass this and declare a global class inside a function. idk if this can be possible, or there is any way to jump this. In other words, i need to read eeprom during global variables initialization, like this.
Code: Select all
byte qtty=EEPROM.read(MNPIXEL);
......
void setup () {....}
void loop () {......}