No announcement yet.

Start and stop with one winbutton

  • Filter
  • Time
  • Show
Clear All
new posts

  • Start and stop with one winbutton

    Hello your specialist,
    I'm desperate with my project. 3 years ago I have
    built the project quick and dirty. Now I need another device. The hardware is the same. Arduino mini pro and a ULCD 32PTU. I operate with the device a small grinder.
    There is a timer and a counter mode. It works so far
    everything. In timer mode, I start and stop the timer with one
    Button. It worked that way. But now I can not stop anymore while the time runs out. That's the same in Counter mode. I
    have no idea what the problem is. It can only be in the Arduino program on GenieEventHandler.

    I have attached the project as a ZIP. Maybe someone can help me.

    Many Thanks
    Attached Files
    Last edited by mgepperth; 5 April 2019, 07:53 PM.

  • #2

    I have opened your attached file and tried to simulate your program.
    I am trying to see what can be the real cause of the issue but I assume
    that it has something to do with the buffer not handled correctly.

    In your loop function, you are updating your LED Digits every time, please try to
    create a millis() function to set the LED Digits value on a given interval.
    This is to minimize the update of the widget and also for the code to have a non-blocking delay.

    Best Regards,


    • #3
      Hello Kevin,

      thanks a lot for your quick help. That was just right.
      I delayed updating the widgets with millis () by 250 ms. Now that works perfectly again.
      I just do not understand why that worked with the same hardware before. Maybe there
      is a difference with the Arduino pro mini. The first ones were original. Now I have bought copies from China.
      No matter, it works again.

      Best regards


      • #4
        Hi Markus,

        I am glad that it helps.
        Thank you for letting us know.

        Best Regards,