To conserve battery power, my Beacon application powers an attached sensor off GPIO pin 24. That way, when the sensor isn't needed I simply call nrf_drv_gpiote_out_clear(24);
and call nrf_drv_gpiote_out_set(24);
when I'm ready to use it again.
As an experiment, I wrote code to set the pin and wait in an endless loop, and then I placed a voltmeter's probes on the Beacon's GPIO 24 and ground pins. It's not showing any voltage, which seems to indicate the "set" didn't work. I can verify that no ASSERTs executed.
I have a few questions about this:
- Is it even possible to power a sensor on the voltage that comes from a GPIO pin?
- Am I measuring the GPIO pin's state correctly by using the voltmeter as described?
- Is there anything else I need to know about powering down sensors on the Beacon board?
Thank you!