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. Arduino Sleep / Wake On Interrupt?

Arduino Sleep / Wake On Interrupt?

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

    Hello,
    Is it possible to have the arduino in sleep mode and wake up when a message arrives to the NRF24l01 Radio?

    I have PIN 8 (IRQ) of the NRF24l01 connected to PIN D2 of the sleeping nano node. When the sleeping nano node goes to sleep, I send a message to the node from another , however the sleeping node does not awake when this happens. Is this possible to do?

    Below is the code I am using, thanks!

    #include <MySensor.h>
    #include <SPI.h>
     
    #define ID 0
    #define OPEN 2
    #define CLOSE 0
     
    MySensor gw;
    MyMessage msg(ID, V_TRIPPED);
     
    void setup() 
    { 
    	Serial.begin(115200);
    	Serial.println("Starting up Sensor Test");
      	gw.begin(incomingMessage,1,false);
    	gw.present(ID, S_DOOR); 
    
    
    }
     
    void loop()
    {
    	// Process for 10 Seconds
    	gw.wait(10000);
    	// Sleep 10 Seconds
    	gw.sleep(2, CHANGE, 10000);
    }
    
    
    
    void incomingMessage(const MyMessage &message) {
        
    	if(message.getInt() == 1){
    		Serial.println("Received command");
    		gw.send(msg.set(OPEN)); 		
      	delay(250);
      
    }
    
    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      Yes, it would be possible. But you won't save much juice as keeping radio in listening mode still requires way too much power to be able to run on batteries for any substantial time.

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


      15

      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