Cannot get Web IDE to compile my simple spark core code

HI All,

I just tried to compile a very simple program it’s …

#include “application.h”

SYSTEM_MODE(AUTOMATIC);

void setup() {
pinMode(D1, OUTPUT);

}

void loop() {

digitalWrite(D1, HIGH);
delay(500);
digitalWrite(D1, LOW);
delay(500);
}

Now when I compile in the Web IDE it just returns this message

Error: could not compile check your code.

Now all of my other spark programs are doing the same in the IDE.

I have cleared the local Cache but the problem still occurs.

Chipmonk

Have you got a blank first line in your code?
Try to remove it.
There was a preprocessor glitch that throws the compiler of.

And you don’t need to include "application.h"
This is done by the preprocessor (when it works correctly ;-))

Thanks for the suggestion.

No blank line.

Remove the include statement.

Still same result.

Chipmonk

Can you post a screenshot of your Web IDE with the code in it?

The code you posted builds fine on my machine.

Have you selected a correct target device?

Attached is a screen shot.

The core shows up in the list of my cores. It also shows up when I do a command line query by this

particle list

Chipmonk

Actually I meant a screenshot of the full browser window - best with the apps drawer open.
One try would be to rename your app too (e.g. test)

This is the complete screen :smile:

I re-named the app to a new file name test_new

Still seee same results.

I am building on the older Spark Core. Do I have to set any additional switches for the old iron?

Chipmonk

Hi All,

Everyone can stand down on this issue. I have moved back to a local compile.

I updated to the particle command line compile / flash ( I am an old command line unix hack)

With the particle command line I am able to compile and flash on my mac :slight_smile:

Thanks to ScruffR for the helpful suggestions on the IDE but since the local compile works I am on line again.

Chipmonk

But it’s still very odd why it doesn’t work for you.

Nothing to see wrong there and it just builds as is on my setup.

Very, very odd!

@chipmonk did you :star: the device you want to work with?

Been there

Answer was: “Yes!” (sort of, but good to double-check ;-))

Yep, had the device stared in the IDE.

No help.

Here the screen for reference

Ahh, there is something rather fishy, since your devices are listed as "OTHER" rather than "Photon" or "Core"

That explains a lot. We’ll come back to you.

This is how it should look like

Good to have a screenshot :wink:

Yes,

Another set of eye always helps :smile:

So how do i set these devices to “cores” as I can’t seem to see that option.

Running Chrome if this is a diff.

chipmonk

I’ve asked the pros already, but I guess it has to do with having the devices claimed to your account properly.
So for further steps you’ll possibly need your Device IDs handy and possibly post them to one of the pros.

Either one of them will contact you direct or I’ll come back to you.

Great!

Thanks for the help. I had given up on the IDE.

Chipmonk

One suggestion I got:
Go to the Settings (gear symbol on the bottom left) and click “Clear Cache”

Then close the browser and go back into Particle Build, and check if your devices are recognized correctly then.

A good suggestion.

Cleared CACHE twice and still cannot compile in the IDE :frowning:

Chipmonk

You could also try clearing the whole browers cache including cookies

And then

If they still aren’t, you could ping @BDub, who suggested to try this first before he’d need to look into it closer.