粒子光子呼吸绿色 [英] Particle Photon breathing green

查看:104
本文介绍了粒子光子呼吸绿色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拥有我的粒子光子,已经有一个多星期了,在刷新代码后,它呼吸成绿色,无法再向其刷新代码.为什么会发生这种情况,如何防止这种情况发生?

I've owned my Particle photon, for little over a week and after flashing my code it's breathing green and I can't flash anymore code to it. Why is this happening and how can I prevent it from occurring?

推荐答案

如果您的光子上出现绿色的呼吸灯或红色闪烁,请尝试此操作! (仅Windows)

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

转到网站 http://dfu-util.sourceforge.net/releases/
下载文件dfu-util-0.9-win64.zip
解压缩(将其打开,然后将新文件夹拖放到桌面上)
打开文件夹
将文件夹放在桌面上
复制路径(应该是这样的:C:\ Users \ student \ Desktop \ dfu-util-0.9-win64)
转到控制面板->系统和安全性->系统->高级系统设置->环境变量->系统变量-> PATH->编辑->新建->将刚刚复制的路径粘贴到其中.
为所有三个窗口单击确定".
关闭控制面板
转到您的用户文件夹(例如C:/Users/student)
创建一个名为"one"的新文件夹(以"MyFolder"文件夹为例)
创建一个文本文件并将一个简单程序粘贴到其中(您知道的任何方法)
将此文本文件放在新文件夹中
将扩展名更改为.ino
打开命令提示符,如果它不在您的学生目录中,请使用命令cd..两次到C:/,然后依次是cd Users和cd USER(您的用户名),然后输入以下命令

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\student\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/student)
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)
Place this text file INSIDE your new folder
Change the extension to .ino
Open command prompt, and if it is not in your student 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

在我们的例子中,它是粒子编译光子MyFolder --saveTo firmware.bin".
使用USB端口连接光子
然后,按住设置按钮3秒钟,点击重置"按钮,然后继续按住设置按钮.
等待arduino指示灯开始洋红色闪烁,然后松开设置按钮(如果该指示灯变为黄色,则表示您按住的时间过长.单击重置"按钮,然后重试).
当灯开始呼吸洋红色时,您就处于安全模式.
现在,您必须单击并按住设置按钮3到4秒钟,直到指示灯开始闪烁蓝色.您的光子现在处于聆听/耳语模式.
然后,在命令行中输入以下命令:

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.
Wait for the arduino 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/whispering mode.
Then, enter the following command in the command line:

 particle flash --serial firmware.bin

然后在询问设备闪烁蓝色时按ENTER"时按Enter键.
就这样!!您的设备现在应该可以工作了!等待几秒钟进行处理.
如果呼吸是青色,那一切都很好!

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!

现在您知道如何解决它,您需要知道如何防止它.

Now that you know how to solve it, you need to know how to prevent it.

好吧,如果您有长时间运行的所有循环,请添加以下行:

Well if you have any loops at all which run for a Long time, put the line:

Particle.process();

循环中的任何地方.

现在为什么?

因为您的光子需要连接到云.由于某种原因,光子处于循环状态时无法连接到云.如果循环太长,由于没有时间连接到云,它将崩溃!这就是呼吸绿灯的意思.

Because your photon needs to connect to the cloud. For some reason, your photon does NOT connect to the cloud when it's in a loop. If the loop goes TOO Long, it will crash as it has no time to connect to the cloud! That's what the breathing green light means.

当您单击光子上的重置按钮时,它将重新启动您的代码,但不会将其删除.因此,每次您的光子再次启动时,代码都会重新启动,并且问题再次发生.上面的代码所做的基本上是使用microUSB电缆在您的光子上闪烁一个新代码.因此不需要云连接.

When you click the reset button on your photon, it RESTARTS your code, it doesn't delete it. So every time your photon starts up again, the code restarts and the problem happens again. What this code above is doing is basically flashing a NEW code onto your photon using the microUSB cable. So no cloud connection is required.

这很烦人,但可以很容易地避免.由于不再需要恢复出厂设置,因此删除光子中的代码是一个漫长而繁琐的过程.

This is something which is annoying, but can be easily prevented. With no factory reset anymore, deleting code off the photon is a Long and tiresome process.

祝你好运!

这篇关于粒子光子呼吸绿色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆