Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Double click | Hold for buttons
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Double click | Hold for buttons

Scheduled Pinned Locked Moved General Discussion
7 Posts 6 Posters 3.3k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    moskovskiy82
    wrote on last edited by
    #1

    Couldn't find any examples on utilising hold or double clicks for the buttons on my sensor nodes. With all the wifi lamps around it would be great to control them via the mysensor nodes and controller

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      No, I can't recall any examples for for double click or hold either.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ericvdb
        wrote on last edited by
        #3

        Maybe this will help: http://jmsarduino.blogspot.be/2009/10/4-way-button-click-double-click-hold.html

        1 Reply Last reply
        1
        • TD22057T Offline
          TD22057T Offline
          TD22057
          Hardware Contributor
          wrote on last edited by
          #4

          I have short and long press status reports on my switch class here. There are example sketches one directory up in the tests area. Double click gets more complicated because you have to decide are you going to delay reporting the press/release from the first click until enough time has passed for it not to be a double click? Or do you report the press/release from the first click, and then report a double click? I'd be surprised if there aren't a lot of arduino double-click switch examples around...

          1 Reply Last reply
          0
          • vorowskiV Offline
            vorowskiV Offline
            vorowski
            wrote on last edited by
            #5

            https://github.com/mathertel/OneButton
            This is what I use for this.

            M 1 Reply Last reply
            0
            • vorowskiV vorowski

              https://github.com/mathertel/OneButton
              This is what I use for this.

              M Offline
              M Offline
              moskovskiy82
              wrote on last edited by
              #6

              @vorowski said:

              https://github.com/mathertel/OneButton
              This is what I use for this.

              Mind sharing some mysensors code to see how you got it implemented?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dakipro
                wrote on last edited by
                #7

                Hi, it is some time since I made this (and used it to be honest) but you can check this post where I integrated what you are asking about.
                https://forum.mysensors.org/topic/4552/sleeping-while-waiting-for-double-click-delayed-sleep/3

                Node and the code is unfortunately not in use currently so I do not recall all the details, but maybe you can get something out of it :)

                C: OpenHAB2 with node-red on linux laptop
                GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                GW: Arduino Mega, RFLink 433Mhz

                1 Reply Last reply
                1
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                5

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                Posts


                Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • OpenHardware.io
                • Categories
                • Recent
                • Tags
                • Popular