Go Down

Topic: Problem with (I think) the EEPROM (Read 229 times) previous topic - next topic

mazzacake

Hi there!
Chiara from Italy here.
I've been working on my first Arduino project and after having stumbled on many beginners issue I'm now left with one. Just on, but an annoying one.
I think it has to do with the EEPROM - just cause it (usually) solves it I clear the EEPROM. But then it comes back.

So here is the project. It's a "movie prompter" with a small movie database.
It involves a 2x16 LCD screen, 4 buttons, a potentiometer (to adjust creen backlight) and a power switch.
By pressing the buttons, movie titles appear on the screen. There are 4 buttons for 4 categories, 15 movies in each category:

button1 - comic movies
button2 - non-comic movies
button3 - Italian cult movies
button4 - documentaries

I use the EEPROM so that after turning off and on the Arduino it would remember where in the list it was and not start over.

It work perfect except for button3. This button sometimes work and sometimes doesn't (I have the feeling it got progressively worse).
I'd exclude bad soldering (although it IS quite shit soldered, I didn't have any pickling paste with me when I did it...) just because if I clear the EEPROM and then reprogram the Arduino, it works fine for a while. But then after a few clicks the issue comes back. <sometime just turning off/on the Arduino settles it, but it's rare. And lately even the clear EEPROM trick don't always work...

Would you have any suggestion on what to try or change?
I'm out of ideas...

My code here https://pastebin.com/VPTq6VGX

Chiara


ps: I'm sorry I don't have photos of the circuit (can't access it without de-soldering) nor the schematic.
All the 4 buttons are places in the same way in the circuit, and the other 3 work just fine.
pps: it's not a problem of the button itself, cause it I close the circuit with a piace of metal (shorting the legs) nothing changes

mazzacake

Update.

I thought of checking what was happening through the serial monitor....printing the count variables when a button was pushed. The outcome looks like the following...
sooo either the button is broken and always pressed...or something is shorting around that?
Can't figure out the effect of the clearEEPROM on it though...
And why it is not going back to 0 after

Code: [Select]
     else if (contaIta == 16) {
      lcd.setCursor(0, 0);
      lcd.print(F("CULT ITALIANI   "));
      lcd.setCursor(0, 1);
      lcd.print(F("FINITIIIIIIIIIII"));
     
      contaIta = 0;
    }



mah...

Here is a summary of the serial monitor:

Code: [Select]

Ita:
32
Ita:
32
Ita:
32
Ita:
33
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
Ita:
33
Ita:
33
Ita:
33
Ita:
33
Ita:
34
Ita:
34
ita
Ita:
34
ita
Ita:
34
ita
Ita:
34
ita
Ita:
34
ita
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Doc:
1
doc
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
Ita:
34
Ita:
34
Ita:
34
Doc:
2
doc
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
No comic:
1
Nocomic
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
No comic:
2
Nocomic
Ita:
34
Ita:
34
Ita:
34
Ita:
35
Ita:
35
ita
35
Ita:
35
Ita:
35
Ita:
36
Ita:
36
ita
Ita:
36
ita
Ita:
36
ita
Ita:
36
ita
Ita:
36
ita


cattledog

#2
Nov 22, 2019, 02:05 am Last Edit: Nov 22, 2019, 02:07 am by cattledog
Can you please write a simple sketch which reproduces the problem using one button, the eeprom, and serial monitor. We will be able to reproduce your setup and confirm whether or not you have a code or hardware problem.

Post the sketch in your forum post. Don't use pastebin. See this reference on how to place our code in your posting using code tags after proper formatting. https://forum.arduino.cc/index.php?topic=148850.0

Go Up