[SOLVED] What does SLEEP mode look like? - Floating Wakeup Pin

I’ve put my photon into sleep mode (or so it seems) because upon calling sleep mode, it starts cycling fairly fast between the green and cyan led on the photon. When I provide the correct interrupt, it then comes back to it’s normal state of running.

My question is this, it looks like it’s still interacting with the shields and components that it talks to because I have a neopixel ring connected to the photon that still turns on despite it supposedly being in “sleep mode”. Does that seem like I did something wrong and that it isn’t actually sleeping?

What is the sleep mode supposed to look like on the particle? Is the main “state led” off?

Are you referring to SLEEP_MODE_DEEP? If so, the main status LED should be off. You should show your code so we can see what you’re doing…

It’s a fairly large project, but the sleep code is very similar to their example and looks like this:


with ENC_A_PIN linked to D2.

I’ve also noticed that the encoder no longer functions after coming back from a “sleep” state. If that is in fact the state that I am in…

That is stop mode, and as it says in the docs, the LED should be off while the device is asleep.

Do you have an external pull-resistor on your wake pin?
If you use a CHANGE trigger, you have to have one (or any other circuitry that prevents the pin from floating).

What pins do you have your external devices connected to?


Thanks for that info, I think that was probably the issue. After changing it to wake on RISING, it worked as expected.

I also found out through logging that after coming out of stop mode the code doesn’t re-run the setup code and only falls back into running the loop. (At least on a photon)

Yup, that’s true. Only SLEEP_MODE_DEEP would go through setup() but can only wake via a RISING edge on the WKP pin.