please help me photon is blinking blue only
There is no Factory Reset on Photons and blinking blue means you have no WiFi credentials stored on the device.
Reading the Getting Started docs might help.
am doing web connected led but I want to show if led1 is on then it has to sho led1 on on cloud but am not able to anything on cloud
int led1 = D7;
int led2 = D0;
void setup()
{
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
Spark.function("led",ledToggle);
}
void loop()
{
}
int ledToggle(String command) {
if (command=="on") {
digitalWrite(led1,HIGH);
Spark.publish("your_unique_event_name","broken");//digitalWrite(led1,HIGH);
Particle.publish("led1","ON",60,PRIVATE);
digitalWrite(led2,LOW);
// Particle.publish("led2","OFF",60,PRIVATE);
return 1;
}
else if (command=="off") {
digitalWrite(led1,LOW);
//Particle.publish("led1","OFF",60,PRIVATE);
digitalWrite(led2,HIGH);
//Particle.publish("led1","ON",60,PRIVATE);
return 1;
}
else {
return -1;
}
}
help with correct prog
The code works, what have you tried?
BTW: This question has nothing to do with the topic of this thread, so why do you ask this here?
actually nothing happens on my dashboard … from 2nd april
I’ve moved your other posts here since they didn’t fit the other threads topic and hijacking threads is frowned upon too.
And blinking blue Photons can’t publish anyway
actually I tried to reset my device wile it blink blue then after 10 sec it has to blink blue but it stusks in blue and if I press reset thn again it is goining to blink blue and by using photon app am not able to connect device
After 10sec all WiFi credentials are removed and you need to enter at least one set of credentials to get out of Listening Mode.
So just go to the docs and re-read this
https://docs.particle.io/guide/getting-started/start/photon/#connect-your-photon
Tell me how to reset it please
With the Photon blinking blue, you have successfully reset it. The next step is to configure the wifi credentials so it can connect to your wifi network.
https://docs.particle.io/guide/getting-started/start/photon/#step-2-connect-with-your-smartphone
Just cleared my photon (holding down the setup button and clicking on reset then holding down the setup button till the led turns white). It is blinking blue, but my phone or any other device will not show the photons wifi ssid so I can use the ios app to connect it to set it up and connect it to another wifi network.
Have you tried pressing reset (for good measure)?
Yes. I did… the photon blinks and then goes back to blinking blue. It seems to realize that it does not have any wifi credentials but it never publishes its ssid for me to connect to.
If the device really turned white, I'm not convinced you actually have a Photon. Photons don't normally do that.
Got a photo of the device?
That is definitely a Photon. The LED is so bright in the photo that it is hard to tell color … blue, cyan white … not sure?
Can you try removing power completely to be absolutely sure it is reset?
The only other thing I can think of to try is to remove the Photon from the shield and try it on its own. I doubt the shield is interfering with the chip antenna for Wi-Fi, but it might be worth a try.
Other than that, I will leave further suggestions to those who have more experience; but you might have to wait since it is the middle of the night for ScruffR.
As a workaround, you could try setting up the Wi-Fi using USB, but that is not really a solution.
What system version have you got on your device?
If you are in fact seeing white after hold SETUP & tap RESET I’d guess your device is pre 0.4.9, since then (or even before that) you can only enter Safe or DFU Mode that way.
So first I’d suggest to get the most recent CLI (currently 1.19.4) and perform
particle update
(in DFU Mode - blinking yellow)
And then you can move on to wiping the creds.
The photo above looks more cyan than white or blue to me, but as @cyclin_al said, that’s hard to tell on a photo.
The correct way to reset the WiFi creds is after power up only press and hold SETUP - no RESET.
After about 3sec the LED will start blinking blue to receice new creds and after 10sec it will rapidly flash blue, indicating the stored creds are being wiped.
After that your Photon should only start back to blinking blue and expise the SoftAP SSID.