If I had a nickel for every time I’ve had to hard reset the photon just to get it into listening mode, I’d be a rich man.
Not only that, but its most of the time hard to even get it to reset!
Once the program is running, I can’t seem to get it to do much of anything. If I hold down the setup button, it usually turns solid green or turns off all together.
If I try holding setup then pressing restart, it stops changing modes and dft mode and won’t go any further. It takes me over an hour sometimes just to get the device to do anything.
Sometimes, when I can get it to factory reset, my computer will not register that it is plugged in.
tldr; getting the photon into listening mode is a repetitive, laborious pain that sucks a lot of time away from development. Can anyone offer any advice? Thanks!
Not to dodge the original question, but why do you need to go into Listening Mode so often?
But to get to the bottom of your problem, what firmware version are you running?
I think on 0.4.5 & 0.4.6 it was a problem getting the Photon into Listening Mode during initial green blink, but with 0.4.7 this should be sorted (and is with my Photons).
What code are you running? Could this interfere with the EXTI lines used for the SETUP button?
Could it be that your SETUP button is damaged? Could you test e.g. with an oszillograph if it switches properly - or just (carefully) use a jumper wire to pull the respective pin low?
Thanks for the response! When holding down setup after pressing restart, the photon cycles through blinking magenta, yellow, green, then white. If I let go during white, the photon appears to reset… it goes into listening mode and won’t run code until I reflash it.
The place that i work has wifi that is incompatible with the photons. To remedy, me and my teammates use our phone hotspots to test our system. This necessitates frequent credential updates.
I’m not sure what version i’m running on, but this is in the readme of the firmware directory:
I don’t think its that the setup button itself; the place I work has many photons and they all seem to have this problem.
I’ve had success with getting it into listening mode while running other code in the past, but recently, even when I flash a simple blank program I still have the same issue.
What is an ext line and how could I test with the wire/scope?
The modes you describe here do indeed suggest that you are running an ancient system version.
I think the green/white after yellow has been dropped with 0.4.5.
And it did actually not perform a factory reset but only cleared your WiFi credentials and I think the application firmware, but did not reflash Tinker (as Factory Reset on the Core did).
So first I’d suggest you update your Photons to the most recent version (0.4.7).
One additional advantage of the new firmware (>=0.4.5) is a bugfix that again allows the Photon to store up to five sets of WiFi credentials, so you won’t need to change credentials as long as you don’t have more than five different APs.
EXTI is an internal line in the µC that allows ***EXT***ernel signals to trigger ***I***nterruts to interrupt the normal code flow, but some pins on the Photon share the same EXTI lines, so if your code contains a attachInterrupt() instruction on a pin that shares the EXTI line with the SETUP button these two would interfere eachothers functionality.
If you say your problem is device independent then I’d say you don’t need to bother with wire/scope.