anyone can teach me how to use eeprom basically....tnx..
newbie.
step by step...
here my sample proj.
sw1 on led1 on
sw2 on led2 on led1 off
sw3 on led3 on led2 off..then
sw1 on led1 on led3 off....
if didnt follow the sequence (sw1 - sw2 - sw3) ledx will on...and when it turn off still ledx will on...only key reset will turn off the ledx....tnx
what i mean in #1 i need the eeprom to read the last sequence..
and when the the ledx is on when it turns off the power supply and turn on the power supply again still the ledx will on...tnx..
if code is possible i need it...thank you..
im a beginner..no knowledge in programing
If someone writes the program for you then you will learn nothing.
Try the examples and see if you can understand how they save an load data to/from the EEPROM. Then think about how and where you might apply these principles to you project
What will be saved ?
When will it be saved ?
What will be read read back ?
When will it be read back ?
iknow the basic..but when using eeprom i really dont know how used some code...thats why im asking for basic eeprom program to deeply understand..tnx for ur comment and concern i appreciated it..
What address in the EEPROM is this reading from and why ?
Why is ledstate an int when the EEPROM.read() returns a byte ?
Have you tried printing ledstate after you read it from EEPROM ?
How is the input pin wired. Do you have a pulldown resistor in place ?
EEPROM.write(ledstate, HIGH);
Where in the EEPROM do you think this writes to, what does it write and why ?
actually i do trial and error coz i really dont know how to use eeprom wat is the exact code to be used..
i appreciate u..tnx. i need further explanation to my code using eeprom
EEPROM coding is coding against READ ONLY MEMORY(ROM)
which is normally a - no go zone - really,
Why do you say that ?
EEPROM is perfect for saving program states in order to resume in the same state as when the system was powered off or reset as long as it is done right, of course.
EEPROM – It stands for Electrically Erasable Programmable Read-Only Memory . It is similar to EPROM, except that in this, the EEPROM is returned to its initial state by application of an electrical signal, in place of ultraviolet light . Thus, it provides the ease of erasing, as this can be done, even if the memory is positioned in the computer. It erases or writes one byte of data at a time .
Uses – It is used for storing the computer system BIOS.
this is why tend not to go there. if anything goes wrong the BIOS might be affected(?) I am no expert to conform this though. well why go there at all when you can achieve your objectives using the memory and loading your program/sketch at run time. I have seen guys messing up with registers and finally messing up the operating system. anyway I respect your view Bob.