Skip to content
  • MySensors
  • 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. Development
  3. Help needed to extend binary sensor to multiple switches

Help needed to extend binary sensor to multiple switches

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 1.0k Views 1 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.
  • C Offline
    C Offline
    chuckconnors
    wrote on last edited by
    #1

    Hey guys. What a wonderful project you've got going on. I've managed to build a temp/humidity/pressure sensor and have been toying with the binary sensor. I was able to create the binary sensor just fine, but now I'd like to extend it to multiple switches on the same node.

    I am not a programmer so I really am just playing around with things and trying to get it to work. I have eight switches that I would like to monitor and am afraid that it would be pretty inefficient to test each switch individually. Is there an easy way to test all switches as a binary number, compare it to the previous value read and then trigger whatever switches have changed. I'm not sure if that even makes sense but would love to see any suggestions and/or code to accomplish something like this.

    Any help is greatly appreciated. Thanks again.

    BulldogLowellB 1 Reply Last reply
    0
    • C chuckconnors

      Hey guys. What a wonderful project you've got going on. I've managed to build a temp/humidity/pressure sensor and have been toying with the binary sensor. I was able to create the binary sensor just fine, but now I'd like to extend it to multiple switches on the same node.

      I am not a programmer so I really am just playing around with things and trying to get it to work. I have eight switches that I would like to monitor and am afraid that it would be pretty inefficient to test each switch individually. Is there an easy way to test all switches as a binary number, compare it to the previous value read and then trigger whatever switches have changed. I'm not sure if that even makes sense but would love to see any suggestions and/or code to accomplish something like this.

      Any help is greatly appreciated. Thanks again.

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #2

      @chuckconnors said:

      is there an easy way to test all switches as a binary number

      yes, with direct port manipulation you can do this.

      Polling Port Registers (you should be able to use 0-7 (PORTD), with the standard MySensors radio attachment)

      play with that and let us know if you need help...

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


      12

      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
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular