Hi all, I have recently been looking into sleep mode for a project that will be battery operated 8 hours a day. It is a simple project using an Arduino nano and two HC-SR04 ultrasonic sensors. If you hold your hand under one sensor it increments a counter, if you hold it in front of the other it decrements the counter. Through most of the day, no one will be using it, but when someone does it needs to be ready.
I would like to put the Arduino into sleep mode after a short while of no presence detected, but is it possible to still read input from the ultrasonic sensors while in sleep mode? Once someone comes along and waves their hand under a sensor I would like to have it wake up and count.
Currently, I have figured out how to activate sleep more, how to start it after X amount of time since the last person waved their hand in front of it, and I have it exit sleep mode by clicking a button connected to Interrupt 1 (pin 2). However the goal here is to be hands-free no contact, so I need to replace the button with input from the ultrasonic sensor or another sensor, like an IR or something.
Why can the Arduino read signals from the button while in sleep mode to wake up, but not the sensor? Both connected to interrupt pins.