Skip to main content

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
    Serial.print(" ");
  Serial.print(10);
     
}

void loop()
{
  

 {}

forFor example, imI'm using EEPROM to see the difference if I print a value inside variable ss to the serial moniter using EEPROM and a normal value inside the variable ff. butBut I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hopeHope you got the idea and I hope to see some feedback. thankThank you..

the LED program

then I made this program that will compare the EEPROM value to num.4 and compares the F variable to num.4 known that both F and the EEPROM values are 4. and then I changed both of the values to 3. shouldn't the GREEN LED of the EEPROM still on because it has already stored num.4??

#include<EEPROM.h>
void setup()
{
  pinMode(12,OUTPUT);
   pinMode(11,OUTPUT);
}

void loop()
{

  EEPROM.write(0,4);                 //GREEN LED
    int f=4;                           //RED LED

  if(EEPROM.read(0)==4)
    digitalWrite(12,HIGH);
  if(f==4)
        digitalWrite(11,HIGH);   
}

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
    Serial.print(" ");
  Serial.print(10);
 
}

void loop()
{
  

 }

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

the LED program

then I made this program that will compare the EEPROM value to num.4 and compares the F variable to num.4 known that both F and the EEPROM values are 4. and then I changed both of the values to 3. shouldn't the GREEN LED of the EEPROM still on because it has already stored num.4??

#include<EEPROM.h>
void setup()
{
  pinMode(12,OUTPUT);
   pinMode(11,OUTPUT);
}

void loop()
{

  EEPROM.write(0,4);                 //GREEN LED
    int f=4;                        //RED LED

  if(EEPROM.read(0)==4)
    digitalWrite(12,HIGH);
  if(f==4)
        digitalWrite(11,HIGH);   
}

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

#include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
  Serial.print(" ");
  Serial.print(10);    
}

void loop()  {}

For example, I'm using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. But I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. Hope you got the idea and I hope to see some feedback. Thank you..

the LED program

then I made this program that will compare the EEPROM value to num.4 and compares the F variable to num.4 known that both F and the EEPROM values are 4. and then I changed both of the values to 3. shouldn't the GREEN LED of the EEPROM still on because it has already stored num.4??

#include<EEPROM.h>
void setup()
{
  pinMode(12,OUTPUT);
  pinMode(11,OUTPUT);
}

void loop()
{

  EEPROM.write(0,4);                 //GREEN LED
  int f=4;                           //RED LED

  if(EEPROM.read(0)==4) digitalWrite(12,HIGH);
  if(f==4) digitalWrite(11,HIGH);   
}
added 699 characters in body
Source Link
klay
  • 43
  • 3

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
    Serial.print(" ");
  Serial.print(10);

}

void loop()
{
  

}

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

the LED program

then I made this program that will compare the EEPROM value to num.4 and compares the F variable to num.4 known that both F and the EEPROM values are 4. and then I changed both of the values to 3. shouldn't the GREEN LED of the EEPROM still on because it has already stored num.4??

#include<EEPROM.h>
void setup()
{
  pinMode(12,OUTPUT);
   pinMode(11,OUTPUT);
}

void loop()
{

  EEPROM.write(0,4);                 //GREEN LED
    int f=4;                        //RED LED

  if(EEPROM.read(0)==4)
    digitalWrite(12,HIGH);
  if(f==4)
        digitalWrite(11,HIGH);   
}

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
    Serial.print(" ");
  Serial.print(10);

}

void loop()
{
  

}

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
    Serial.print(" ");
  Serial.print(10);

}

void loop()
{
  

}

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

the LED program

then I made this program that will compare the EEPROM value to num.4 and compares the F variable to num.4 known that both F and the EEPROM values are 4. and then I changed both of the values to 3. shouldn't the GREEN LED of the EEPROM still on because it has already stored num.4??

#include<EEPROM.h>
void setup()
{
  pinMode(12,OUTPUT);
   pinMode(11,OUTPUT);
}

void loop()
{

  EEPROM.write(0,4);                 //GREEN LED
    int f=4;                        //RED LED

  if(EEPROM.read(0)==4)
    digitalWrite(12,HIGH);
  if(f==4)
        digitalWrite(11,HIGH);   
}
added 35 characters in body
Source Link
klay
  • 43
  • 3

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

**

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(EEPROMs); 
    Serial.readprint(0" ");
  Serial.print(10); 

} 

void loop()
{
   

}

**

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

**

#include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  Serial.print(EEPROM.read(0));
}
void loop()
{
  
}

**

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

I want to know the purpose of using the EEPROM because I can't get it, I mean I know that it can store values for a long time, but I just can't get the goal here

 #include<EEPROM.h>
void setup()
{
  Serial.begin(9600);
  EEPROM.write(0,4);
  int s=EEPROM.read(0);
  int f=10;
  Serial.print(s); 
    Serial.print(" ");
  Serial.print(10); 

} 

void loop()
{
   

}

for example, im using EEPROM to see the difference if I print a value inside variable s to the serial moniter using EEPROM and a normal value inside the variable f. but I couldn't find the difference between both because when unplugging the power and turn it on again, both of them are printed. hope you got the idea and I hope to see some feedback. thank you..

added 108 characters in body
Source Link
klay
  • 43
  • 3
Loading
Source Link
klay
  • 43
  • 3
Loading