47aravind
47aravind

Reputation: 13

Particle photon Light is turning Red

I'm new to particle photon family. (https://docs.particle.io/guide/getting-started/start/photon/)

When my photon particle device is turned on the light which are blinking are as follows.

First some Green blinks

and then red blinks

and then the photon is getting reset.

I tried putting the photon in safe mode, but in safe mode, magenta light is getting turned on, when I remove hold from setup (mode) button the photon is getting reset and again green and red lights are blinking.

Can anyone help me in this?

Upvotes: 0

Views: 472

Answers (2)

Ryan Jin
Ryan Jin

Reputation: 119

My friend and I actually met this problem before, and he posted the solution for breathing/blinking green. But it works literally the same for blinking red. You can check out his solution at Particle Photon breathing green

So I'll basically give you the same instructions

If you are getting a green breathing light or blinking red on your photon, try this! (Windows only)

Go to the website http://dfu-util.sourceforge.net/releases/

Download the file dfu-util-0.9-win64.zip

Unzip it (Open it and drag and drop the new folder on your desktop)

Open the folder

Place the folder on your desktop

Copy the path (it should be something like this: C:\Users\myName\Desktop\dfu-util-0.9-win64)

Go to the control panel -> System and Security -> System -> Advanced System Settings -> Environment Variables -> System Variables -> PATH-> Edit -> New -> Paste the path you just copied inside it.

Click Ok for all three windows

Close control panel

Go to your user folder (eg C:/Users/Ryan)

Create a new folder called anything that is one word(we are using the folder “MyFolder” as an example)

Create a text file and paste a simple program into it(anything you KNOW works). For instance, you can do the following program

void setup() { }
void loop() { delay(100); } // In case it goes into a loop that burns the CPU

Place this text file INSIDE your new folder

Change the extension to .ino

Open command prompt, and if it is not in your user directory, use the command cd.. Twice to C:/ and then cd Users and then cd USER(your user name), and then enter the following command

particle compile photon [FOLDER NAME] --saveTo firmware.bin

In our case, it is “particle compile photon MyFolder --saveTo firmware.bin”

Connect your photon using the usb port

Then, hold down the setup button for 3 seconds, tap the reset button, and continue holding down the setup button until the photon light to start blinking magenta, and release the setup button (if the light turns yellow, you have held on too long. Click the reset button and try again)

When the light starts breathing magenta, you are in safe mode.

Now, you have to click and hold the setup button for 3-4 seconds until the light starts blinking blue. Your photon is now in listening mode.

Then, enter the following command in the command line:

particle flash --serial firmware.bin

And then just hit enter when it asks “Press ENTER when your device is blinking BLUE”

That’s all!! Your device should now work! Wait for a few seconds for it to process.

If it is breathing cyan, your all good!

NOTE: FIND OUT THE REASON

It is highly likely that you made new objects and never deleted them. If you ever use the "new" keyword. Like

int mInt = new int();

You have to make sure that you delete it later on, like

delete mInt;

For an array, it is

delete[] mArray;

Even if it is a return value. You have to make sure that the variable the function that returns a new object assigns is being manually deleted after it is used. This is usually the red blinking problem I meet.

Upvotes: 0

fman
fman

Reputation: 230

You need to put it in DFU mode and then reflash the firmware from the Particle CLI on a computer

Upvotes: 0

Related Questions