Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By MyESP
#84913 I have this in my sketch:

Code: Select all#define LIST_SIZE 2

uint8_t friendmac[LIST_SIZE][ESPPL_MAC_LEN] = {
  {160, 204, 43, 150, 60, 55},
  {66, 124, 12, 155, 122, 44}
};

All I'm trying to do is make the numbers come from EEPROM. I have the EEPROM setup right and I can read and write. I tried something like this but it doesn't work:

Code: Select all#define LIST_SIZE 2

uint8_t friendmac[LIST_SIZE][ESPPL_MAC_LEN] = {
{EEPROM.read(1), EEPROM.read(2), EEPROM.read(3), EEPROM.read(4), EEPROM.read(5), EEPROM.read(6)},
{EEPROM.read(7), EEPROM.read(8), EEPROM.read(9), EEPROM.read(10), EEPROM.read(11), EEPROM.read(12)}
};
User avatar
By MyESP
#84929 Ok so if EEPROM.begin(32); is inside my void setup(); would putting the code below it work? I though if its below void setup it works? Like this:

Code: Select allvoid setup() {
...
...
...
  EEPROM.begin(32);
  }

#define LIST_SIZE 2

uint8_t friendmac[LIST_SIZE][ESPPL_MAC_LEN] = {
{EEPROM.read(1), EEPROM.read(2), EEPROM.read(3), EEPROM.read(4), EEPROM.read(5), EEPROM.read(6)},
{EEPROM.read(7), EEPROM.read(8), EEPROM.read(9), EEPROM.read(10), EEPROM.read(11), EEPROM.read(12)}
};


If not, how can I rewrite this so it works?