Particle Dev doesn't compile changed code

I’m using photon. I started a simple program with a LED. It’s supposed to turn on and off every second. The first time I compiled (flashed it) into the device. It compiles without errors at all. It works. It successfully does the operations on the LED. But I tried changing the time interval to 2 seconds. I save the file, compile it again, the device’s led (mode) changes (Magenta meaning that It’s updating, then goes to blinking cyan and finally breathing cyan probably meaning that It’s online and ready). But the LED diode blinks every second instead of 2. Which means that it didn’t actually insert the code at all. For compiling, I first go “Upload in cloud and show errors if any” or something (The cloud icon with a check mark), then after waiting for a few seconds to pass I click on the bolt icon “Upload in cloud and upload code using cloud”.

This is the code if It’s necessary. Got it from a site.

#define led1 D0

void setup()
{
  pinMode(led1, OUTPUT);
}

void loop()
{
  digitalWrite(led1, HIGH);
  delay(2000);
  digitalWrite(led1, LOW);
  delay(2000);
}

Actually I’m lying. I tried it a couple of times before and worked. But now trying the same method doesn’t work. Before I tried it dozens of times and still worked. (After changing and saving the code in the IDE I press the RESET button on the device, wait for it to go breathing cyan, then do “Upload in cloud and show errors if any” then “Upload in cloud and upload code using cloud”. I thought that was all. But after a while I turned it on again and tried to change the time again and upload it in the same method. But this time It didn’t change. I’m new to this and I don’t really understand the particle dev at all. If you think that I always did it using this obviously dumb method. Wrong. I tried clicking only on the bolt icon (I got this from another thread I believe).

Make sure you’ve got no other files in the directory you’re in. Explicitly save the file. Then make sure you’ve targeted the correct device, hit ‘compile’ and finally ‘flash’.
Alternatively, give Safe Mode a try and see if that helps.

No luck at all. The .bin file is I believe the compiled code. I tried deleting it through the IDE. But it won’t move at all. Even tried restarting the IDE as Admin. Then I went to the folder and deleted the .bin file, compiled it, flashed it, same result. I always save when I edit it no matter what or how much I edit. And no luck with Safe Mode. I really don’t know what I’m doing and It’s quite confusing.

Could you make a screenshot of the entire window, if possible?

This?

I’m pretty sure the device and I both are confused. Except that I can’t restart myself. While in safe mode, It’s supposed to blink/breathe (Can’t remember) be magenta, right? It didn’t go magenta in the IDE next to the device name at the bottom.

Edit: I thought Particle Dev was referred to as the opposite of the online compiler (local compiler)

Forgot about this. The solution is definitely getting better wifi. It was connected to a modem in the other room making it connect a bit longer and probably caused some problem like cancelling the upload. Now I connected the device to a router right in the same room with good wifi and uploads it instantly.

1 Like