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. How can I call RF24::powerDown() from my own sleep function?

How can I call RF24::powerDown() from my own sleep function?

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 2.3k 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.
  • Paul AugustoP Offline
    Paul AugustoP Offline
    Paul Augusto
    wrote on last edited by
    #1

    I have worked out the logic to use the PinChangeInt library to have multiple buttons wake a battery operated scene controller so I can make a MiniMote type clone. This sketch framework should also work to make a battery operated door/window sensor that can handle multiple switches. The only problem is I can't use the built in sleep function in 1.4, the interrupts that PinChangeInt generate doesn't cause it to exit. I have been able to port part of it out of the MySensor.cpp library. I found I can call LowPower.powerDown without having to do anything special but haven't figured out how to call RF24::powerDown().

    hekH 1 Reply Last reply
    0
    • Paul AugustoP Paul Augusto

      I have worked out the logic to use the PinChangeInt library to have multiple buttons wake a battery operated scene controller so I can make a MiniMote type clone. This sketch framework should also work to make a battery operated door/window sensor that can handle multiple switches. The only problem is I can't use the built in sleep function in 1.4, the interrupts that PinChangeInt generate doesn't cause it to exit. I have been able to port part of it out of the MySensor.cpp library. I found I can call LowPower.powerDown without having to do anything special but haven't figured out how to call RF24::powerDown().

      hekH Online
      hekH Online
      hek
      Admin
      wrote on last edited by
      #2

      @Paul-Augusto

      Did you try

       gw.powerDown();
      
      Paul AugustoP 1 Reply Last reply
      0
      • hekH hek

        @Paul-Augusto

        Did you try

         gw.powerDown();
        
        Paul AugustoP Offline
        Paul AugustoP Offline
        Paul Augusto
        wrote on last edited by
        #3

        @hek

        Well, that was too easy! :) Now all I have to do is resolve the compile error I get when including the PinChangeInt library without removing MyGateway.cpp from the MySensors library folder, being discussed in http://forum.mysensors.org/topic/347/1-4-error-compiling-with-pinchangeint-h-library-file

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


        17

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 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