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. Design question about using interrupts or not

Design question about using interrupts or not

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 629 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.
  • G Offline
    G Offline
    Gerard van Seventer
    wrote on last edited by
    #1

    Hi All,

    Since this is my first post I would like to thank all who made MySensors possible!

    In my development environment I have several setups as a proof of concept with all kind of sensors, relays, LCD and so on. It works great and I am about to begin in designing a number of permanent nodes but have some thoughts about whether or not use interrupts.

    The node I am working on is based on a Nano and NRF24 radio. On this node there will be following connected: DHT22, DS18b20, LDR(analog), 2 relays and 4 reed switches.

    The 4 reed switched are to monitor some doors. A reaction time on those switches of about 0.5 second is enough(i think). So my question is; Should I use interrupts or is it better to (semi) continuously check the switches and occaisionally check and report the other sensors.

    I know I could use interrupts but since there are doors to monitor and not several 10.000rpm tacho's I would like to keep it as simple as possible.

    Please let me know if you have some thoughts on this.

    Kind regards,
    Gerard

    mfalkviddM 1 Reply Last reply
    0
    • G Gerard van Seventer

      Hi All,

      Since this is my first post I would like to thank all who made MySensors possible!

      In my development environment I have several setups as a proof of concept with all kind of sensors, relays, LCD and so on. It works great and I am about to begin in designing a number of permanent nodes but have some thoughts about whether or not use interrupts.

      The node I am working on is based on a Nano and NRF24 radio. On this node there will be following connected: DHT22, DS18b20, LDR(analog), 2 relays and 4 reed switches.

      The 4 reed switched are to monitor some doors. A reaction time on those switches of about 0.5 second is enough(i think). So my question is; Should I use interrupts or is it better to (semi) continuously check the switches and occaisionally check and report the other sensors.

      I know I could use interrupts but since there are doors to monitor and not several 10.000rpm tacho's I would like to keep it as simple as possible.

      Please let me know if you have some thoughts on this.

      Kind regards,
      Gerard

      mfalkviddM Online
      mfalkviddM Online
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      Welcome to the forum @gerard-van-seventer!
      If the nodes have a permanent power supply (not batteries), checking the switches will be sufficient. You can probably check them every millisecond if you want - a millisecond is a long time for a microcontroller.

      1 Reply Last reply
      1
      • G Offline
        G Offline
        Gerard van Seventer
        wrote on last edited by
        #3

        Thanks @mfalkvidd for your quick reply.
        Indeed it isn't battery powered. I already have a millis() delay loop so checking the swithes is easy then.
        Thanks again!

        1 Reply Last reply
        1
        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