I should also add that the board had run out of battery power over night yesterday. When I started working on it again today I suddenly have this problem. Maybe the board running out of power corrupted something?
Also in addition to breathing cyan, the board suddenly flashed cyan rapidly for 10 seconds and then went back to breathing cyan.
I tried that page again and now it says the board is online. I put the argument on into the box and press go but nothing happens.
***edit: *** I tried again and it says offline ⦠no idea what is happening here.
That does in fact look like your program is blocking the cloud connection for some reason or the other.
Try updating to 0.6.0 and flash the code again, and this time build it via CLI
For that put your code into a text file with the extension .ino and run
particle compile electron <yourTextFile.ino> --saveTo firmware.bin
put your device in DFU Mode (blinking yellow) and run
particle flash --usb firmware.bin
paricle flash --serial frimware.bin will also report succes even when the firmware didnāt stick.
Well I did all those things, which seemed to work fine. Updated the firmware. Flashed the program as you said. Still getting Function call failed Timed out.
This code worked fine for me the other day. Iām getting the same result with other code.
// -----------------------------------
// Controlling LEDs over the Internet
// -----------------------------------
/* First, let's create our "shorthand" for the pins
Same as in the Blink an LED example:
led1 is D6, led2 is D7 */
int led1 = D6;
int led2 = D7;
// Last time, we only needed to declare pins in the setup function.
// This time, we are also going to register our Particle function
void setup()
{
// Here's the pin configuration, same as last time
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
// We are also going to declare a Particle.function so that we can turn the LED on and off from the cloud.
Particle.function("led",ledToggle);
// This is saying that when we ask the cloud for the function "led", it will employ the function ledToggle() from this app.
// For good measure, let's also make sure both LEDs are off when we start:
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
}
/* Last time, we wanted to continously blink the LED on and off
Since we're waiting for input through the cloud this time,
we don't actually need to put anything in the loop */
void loop()
{
// Nothing to do here
}
// We're going to have a super cool function now that gets called when a matching API request is sent
// This is the ledToggle function we registered to the "led" Particle.function earlier.
int ledToggle(String command) {
/* Particle.functions always take a string as an argument and return an integer.
Since we can pass a string, it means that we can give the program commands on how the function should be used.
In this case, telling the function "on" will turn the LED on and telling it "off" will turn the LED off.
Then, the function returns a value to us to let us know what happened.
In this case, it will return 1 for the LEDs turning on, 0 for the LEDs turning off,
and -1 if we received a totally bogus command that didn't do anything to the LEDs.
*/
if (command=="on") {
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
return 1;
}
else if (command=="off") {
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
return 0;
}
else {
return -1;
}
}
Hmm, as expected by you and after looking at the code, that should in deed work - and it does on my Electron too.
So some stabs in the dark.
You are using the Particle SIM?
Can you post the output of particle binary inspect firmware.bin (executed where youāve got the binary) and particle serial inspect (with Electron in Listening Mode and USB connected)?
Thatās odd. Everything looks fine but doesnāt behave as expected.
Maybe @ctmorrison is right and there is something fishy with some servers.
Maybe @Dave can have a look at some logs about your device.
Iāll just post here and hope the other thread gets attention, too. I have noticed it seems to make much longer for the Electron to get into a normal ābreathing cyanā pattern and along the way between rapid flashes of cyan there are brief multiple flashes of read. Iāve not noticed this in the past, but wanted to mention it in case itās symptomatic of some underlying cause.
This particular Electron is not not able to publish and never shows anything in the logs. It is as identical as possible to the other 4 Electrons that are not experiencing the same issue: same application code, same SIM source (Particle), same hardware (very simple). The only difference since the problem surfaced is that I recompiled this one and updated the OS from 0.5.2(?) to 0.6.0.
Hey folks ā thanks for raising flags and reporting some inconsistent behavior. We picked up on the issue this morning and it should now be resolved. You can learn more and read the incident report here:
Unfortunately for me, after having my Particle off all night I came back today to find the same problem.
This is quite frustrating as I am working on a project and now I canāt develop any further.
@Antoniokly ā is everything still working for you today?
@kennethlimcp ok I just downloaded tinker app for my phone to try this. The device appears in the list ā does that mean it has the Tinker firmware? I canāt find where to download the Tinker firmware. Can flash it over serial from my machine to save data?
When I enter particle device online into command line i get this: