Skip to main content
2 of 2
deleted 2 characters in body
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59

The problem might be that you do not debounce the buttons. When you press a button, there is somehwere between fully pressed and not pressed (or backwards) a state there it 'bounces', e.g. you get lots of state transitions, resulting in seeing a button pressed twice or many times instead of once.

Check the debounce example in the default Arduino Tutorial

Michel Keijzers
  • 13k
  • 7
  • 43
  • 59