eeprom dbounce !!!! NEED HELP

I am creating a motor controller so i want that when my power is cut of it should remember its state and turned on ya off when power comes back. I want to make it work with only one touch button ttp223bsf , I need HELP please any one Who can HELP me put up the program plzzzz.

piyush310:
I am creating a motor controller so i want that when my power is cut of it should remember its state and turned on ya off when power comes back. I want to make it work with only one touch button ttp223bsf , I need HELP please any one Who can HELP me put up the program plzzzz.

I’m just trying to clarify what you want to do.
You have a motor which is controlled by a single (I suppose non latching) button. Press it once and it switches on, the next press switches it off etc.
You want to store the current state of the motor (on/off) in the EEPROM so that when the sketch starts, the motor is in the same state as when the sketch last terminated. Is that it ?
Have you looked at Arduino - EEPROM ?
Can you post a link to this device ttp223bsf

I have never heard of an EEPROM having a bounce problem?

Unless, perhaps, when you drop it on a hard floor :slight_smile:

...R

can you please define your link because i did not find any thing in that related to this i want to turn on and off with a single button or if you can write or edit the code for me it will be helpfull

When I googled "ttp223bsf", I only got 1 reply - this topic.

So what exactly is a tt223bsf?

I googled tt223 and it came up with this capacitive touch sensor;

can you please define your link because i did not find any thing in that related to this i want to turn on and off with a single button or if you can write or edit the code for me it will be helpfull

  1. Please read the forum rules and follow them so that we can better follow what you want to tell or ask us
  2. Would you please be so kind and use sometimes a capital letter or punctuation and/or structure your information in a way that it is better readable?

Thanks.

To jump around your stated requirement...
What i do is monitor the unregulated input voltage (may need a cap to hold supply up for a few mS).
Then when i see the supply going down, i save to EEPROM, and crash stop the controller until whatever conditions are recovered for continuing.