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. Controllers
  3. Mozilla WebThings Gateway
  4. GPIO Button toggle
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

GPIO Button toggle

Scheduled Pinned Locked Moved Mozilla WebThings Gateway
gpio
3 Posts 2 Posters 42 Views 2 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.
  • R Offline
    R Offline
    rpyne
    wrote on last edited by
    #1

    I'm trying to figure out how set up a rule to get a GPIO input button to toggle a GPIO output. I cn get it to turn on as long as the button is held, but no luck getting it to toggle.

    I've spent several hour searching and experimenting with no success.

    Thanks in advance for any pointers.

    skywatchS 1 Reply Last reply
    0
    • R rpyne

      I'm trying to figure out how set up a rule to get a GPIO input button to toggle a GPIO output. I cn get it to turn on as long as the button is held, but no luck getting it to toggle.

      I've spent several hour searching and experimenting with no success.

      Thanks in advance for any pointers.

      skywatchS Offline
      skywatchS Offline
      skywatch
      wrote on last edited by skywatch
      #2

      @rpyne Do you want the GPIO to be on when you push the button and GPIO off when you release the button, or do you want it to be like, press, GPIO on, press, GPIO off, press, GPIO on etc.....???

      R 1 Reply Last reply
      0
      • skywatchS skywatch

        @rpyne Do you want the GPIO to be on when you push the button and GPIO off when you release the button, or do you want it to be like, press, GPIO on, press, GPIO off, press, GPIO on etc.....???

        R Offline
        R Offline
        rpyne
        wrote on last edited by
        #3

        @skywatch said in GPIO Button toggle:

        @rpyne Do you want the GPIO to be on when you push the button and GPIO off when you release the button, or do you want it to be like, press, GPIO on, press, GPIO off, press, GPIO on etc.....???

        I want it to toggle with each press, press, GPIO on, press, GPIO off, etc. I figured out how to do it with two separate rules for on and off, but it really should have a toggle function so that it only takes one rule.

        I also want the GPIO settings to allow setting the pull-up or pull-down built in to the newer Rpis so I don't have to use an external resistor to get stable inputs. I tried setting them with the boot overlay, but never could get the inputs to work if initialized through the overlay.

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


        4

        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