Hi,
I am working on a midi controller project. The controller has a preset mode. When a preset is selected it gets the button states predefined in prsBtState variable and updates the current butoon states.
The prsBtState state variable is a 20x8 int matrix.
int prsBtState[20][8] ={
{1, 0, 0, 0, 0, 0, 0, 0},//A1
{0, 1, 0, 0, 0, 0, 0, 0},//A2
{0, 0, 1, 0, 0, 0, 0, 0},//A3
{0, 0, 0, 1, 0, 0, 0, 0},//A4
{0, 0, 0, 0, 1, 0, 0, 0},//B1
{0, 0, 0, 0, 0, 1, 0, 0},//B2
{0, 0, 0, 0, 0, 0, 1, 0},//B3
{0, 0, 0, 0, 0, 0, 0, 1},//B4
{0, 1, 0, 1, 0, 1, 0, 1},//C1
{1, 1, 1, 1, 1, 1, 1, 1},//C2
{0, 0, 0, 0, 0, 0, 0, 0},//C3
{1, 0, 1, 0, 1, 0, 1, 0},//C4
{1, 1, 1, 1, 1, 1, 1, 1},//D1
{0, 0, 0, 0, 0, 0, 0, 0},//D2
{1, 0, 1, 0, 1, 0, 1, 0},//D3
{0, 1, 0, 1, 0, 1, 0, 1},//D4
{0, 0, 0, 0, 0, 0, 0, 0},//E1
{1, 0, 1, 0, 1, 0, 1, 0},//E2
{0, 1, 0, 1, 0, 1, 0, 1},//E3
{1, 1, 1, 1, 1, 1, 1, 1}//E4
};
The current sketch is working perfect. However each time I want update the predefined presets I need to change the sketch and recompile it. Now I want to build a custom GUI (I am planning to use processing) to update the presets. The goal is send the preset updates via serial to arduino and update the prsBtState. I think I need to store prsBtState in the EEPROM in order to achive this.
I am correct; how can I store this int matrix in EERPOM?
I am wrong; what is the best way to achive my goal?
Thanks in advance.