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. Mutiple sensors with Interrupt

Mutiple sensors with Interrupt

Scheduled Pinned Locked Moved Development
4 Posts 2 Posters 1.8k 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.
  • M Offline
    M Offline
    mainali
    wrote on last edited by
    #1

    Hi All,

    I am planning to connect a 8 channel relay with arduino in a room. I am also going to attach a current sensor to each relay to know if someone has switched on a device manually(To know the state of the switch).

    As per my knowledge till now, only pin 2 and 3 of arduino support interrupt. If I have to send a message based on the manual operation of switch, that is current sensor reading the load and sending message to openHAB, how to go ahead with this. Am I missing something, can this be achieved ?
    Please help with any pointers on this.

    BulldogLowellB 1 Reply Last reply
    0
    • M mainali

      Hi All,

      I am planning to connect a 8 channel relay with arduino in a room. I am also going to attach a current sensor to each relay to know if someone has switched on a device manually(To know the state of the switch).

      As per my knowledge till now, only pin 2 and 3 of arduino support interrupt. If I have to send a message based on the manual operation of switch, that is current sensor reading the load and sending message to openHAB, how to go ahead with this. Am I missing something, can this be achieved ?
      Please help with any pointers on this.

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

      @mainali

      you can use several inputs into one pin.

      Check out Nick's Example.

      there also exist "Pin Change Interrupts" which you can google. there are libraries available for using them.

      You may very likely do this completely without interrupts......

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mainali
        wrote on last edited by
        #3

        @BulldogLowell said:

        You may very likely do this completely without interrupts......

        I am planning to use current sensor with each and every switch around the house to know if someone pressed the switch. Is there a better way of doing this, then the one I am thinking.

        Can you please explain, what did you mean by I can achieve this without interrupts.

        BulldogLowellB 1 Reply Last reply
        0
        • M mainali

          @BulldogLowell said:

          You may very likely do this completely without interrupts......

          I am planning to use current sensor with each and every switch around the house to know if someone pressed the switch. Is there a better way of doing this, then the one I am thinking.

          Can you please explain, what did you mean by I can achieve this without interrupts.

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

          @mainali

          It would be easier if you showed the type of sensor, but basically, you would be constantly reading its output, and reflecting changes between HIGH and LOW (if it has digital output) or using analog thresholds.

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


          14

          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