This is currently what I have. I like to have more than one struct value so as to keep things organized in my mind:
struct config_settings { //these are stored in EEPROM @ 50
int accel; //(516 orginally) Offset for the accelerometer when setting level
int gyro; //(467 orginally) Offset for the gyro when setting level
}
offset;
struct config_steering { //these are stored in EEPROM @ 25
int center; //the value of the steering potentiometer in the center position
}
steering;
So then I can refer to them like:
steering.center
...or
offset.gyro
my question is: Since I only have one variable in the struct called steering, can I skip the struct, and just use a normal variable, like "steeringVal", and yet still use the writeAnything utility to save it to memory. I currently do this:
EEPROM_writeAnything(25, steering); //save the steering settings to EEPROM @ 25
Could I skip the struct thing and just do this?
int steeringVal = analogRead(steeringPin);
EEPROM_writeAnything(25, steeringVal); //save the steering settings to EEPROM @ 25