mathertel / OneButton

An Arduino library for using a single button for multiple purpose input.
http://www.mathertel.de/Arduino/OneButtonLibrary.aspx
Other
920 stars 230 forks source link

Button within Buttons for controlling LED show? #98

Closed CobaltEcho closed 7 months ago

CobaltEcho commented 2 years ago

I'm trying to set up multiple shows that change on a button (Button1) press, but one of the shows is a counter that counts from 00-99 on different button (Button2) press.

I can do the "multiple shows that change on a button press" and I can do the "counts from 00-99 on another button press" individually, but I can not figure out how to get one "inside" the other.

Any insights would be apprecaited, code linked below.

Code: https://github.com/CobaltEcho/LEDMatrixNumberCounting/tree/main/MatrixTestv2

mathertel commented 7 months ago

I try to find out what you need and you might not need to have an "inside" here.

The Increment number attached to the click of the second button my include the condition (whichShow == 2) so you cannot increment the number while not in the number show more.

Hope that helps.