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

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

问题描述

我的 Particle photon 已经拥有一个多星期了,在我的代码闪烁后,它变成绿色,我无法再向它闪烁代码.为什么会发生这种情况,我该如何防止它发生?

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)
创建一个名为任何一个单词的新文件夹(我们以文件夹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

在我们的例子中,它是particle compile photon 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天全站免登陆