Go Down

Topic: Quick help with EEPROM.read() (Read 853 times) previous topic - next topic


Feb 28, 2011, 02:56 pm Last Edit: Feb 28, 2011, 02:58 pm by Bebbetufs Reason: 1
Code: [Select]

//____________Defining global variables________________________________________
   boolean pType = 0; //Choose BAR = false /psi = true =!0

//____________Reading values from eeprom_______________________________________
pType = EEPROM.read(0);

void saveSettings()
      if (flagChanges = 1) //Only save if necassary!
            EEPROM.write(0,pType); //Pressure units
             lcd.setCursor(2, 1); // set the cursor to column 3, line 0                         
             lcd.print("NO CHANGES MADE!");
             lcd.setCursor(4, 2); // set the cursor to column 3, line 0                         
             lcd.print("EXITING MENU");
             menu.moveUp(); //EXIT up one level   

Causes error message
expected constructor, destructor, or type conversion before '=' token

I can't figure out what's causing this.


If you post your whole code we can reproduce the feature.

I assume  pType = EEPROM.read(0);  is causing the error as it is done outside a function ...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Feb 28, 2011, 03:31 pm Last Edit: Feb 28, 2011, 03:33 pm by Bebbetufs Reason: 1
Had to attach it as zip.
It is too big for the forum.... but, you are right. I need to put it inside "void setup()"


Code: [Select]
if (flagChanges = 1) //Only save if necassary!
is not the same as
Code: [Select]
if (flagChanges == 1) //Only save if necassary!
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up