programming options (solved)

no wories.

i tried debouncing but it is not reliable.

It is, if bouncing is the issue. I’m guess that it isn’t, though. More likely, you want to increment, or decrement, when the appropriate switch BECOMES pressed, but that you are incrementing, or decrementing, if the switch IS pressed.

But, no code == no help.

On the off chance that it proves interesting, look at the state change detection example. Or, look at how your switch is actually wired.

reply

void loop() {
  if (dly <=0)dly =0;
  delay (dly);//just to make thigns more friendly

There is nothing friendly about calling delay() with a value of 0.

I
can’t
read
code
where
you
can’t
bother
to
indent.

There is an Auto Format option on the Tools menu. Use it.

There is nothing in that code that reads a digital pin where a mechanical switch that bounced might be attached. So, debouncing is not going to solve your problem, since nothing is bouncing.

my problem was not actually solved, but this forum has not made a nice greeting.

????

granted PaulS can be rather blunt, but if you don't post your code it's difficult/impossible to see what might be going wrong.

Going back and retroactively altering/deleting your posts also simply adds to the confusion and prevents anyone who might be able to help from doing so.

.