Particle Dev compiler issues

Hi Friends,

I am having issues compiling using particle dev. It seems that in the configuration I have it in now, it doesn’t catch errors. to test this I threw a random character in my script and it still compiled. To further test it I threw a particle variable on a sensor reading and flashed the code, and no variables are exposed to the cloud. I even tried bringing i to the web ide to see if that would catch the error, and i get the dreaded OneWire error that I reference in the link below (one).

I am new to the desktop ide so take it easy on me, any insight is greatly appreciated always.

Here is my code; (look familiar from past posts : One, Two)

    #include "application.h"
    #include "spark-dallas-temperature/spark-dallas-temperature.h"
    #include "OneWire/OneWire.h"

    // Sensor initialazation
      //DS1820B - water temperature
        #define ONE_WIRE_BUS D2
        OneWire oneWire(ONE_WIRE_BUS);
        DallasTemperature sensors(&oneWire);
        DeviceAddress inWaterThermometer = { 0x28, 0xB6, 0x78, 0x5E, 0x07, 0x0, 0x0, 0x4F };

    int TempHigh=100;
    int TempLow=40;
    double TempRead = -1;
    double InTempC =0;
    bool TempFlagA=true; //true - in threshold , false - out of range
    int TempFlagB=0; // -1 is low ie turn the heater on, 0 is in range, 1 is high ie let some water in

    void setup() {
      //Water Temp sensor
        sensors.setResolution(inWaterThermometer, TEMPERATURE_PRECISION);
        Particle.variable("temp", InTempC)


    void loop() {


        update18B20Temp(inWaterThermometer, InTempC);
        TempRead = (InTempC * 9)/5 + 32;

      int TempResult = TempThreshold( TempHigh, TempLow, TempRead);

        //Change below

        if (TempResult==0){
            Serial.println("in range, no actions taken");
            // Put everything to do here
        else if(TempResult==-1){
            Serial.println("Temp low, heater turned on");
            // insert commands to call heater function
        else if(TempResult==1){
            Serial.println("Temp high, add more water");
            //insert fucntions for adding water for limited amount of time

    //for testing

    Serial.print("Water Temp:");


    /*/////////////////////////END OF LOOP//////////////////////////////////////*/
      //Water Temp
    void update18B20Temp(DeviceAddress deviceAddress, double tempC)
      tempC = sensors.getTempC(deviceAddress);


    int TempThreshold(int hi, int low, int reading){
        if((hi>=reading) && (low<=reading)){
            return TempFlagB;
        else if(hi<reading){
            return TempFlagB;
        else if(low>reading){
            return TempFlagB;


With Particle Dev you need to use the Open folder ... menu item to direct the compiler to that folder.
Since projects are built and not individual files, the actual file you are working on is irrelevant - the project tree counts.

1 Like

So I am wrong using the open project folder item? here is screen grab of what my tree looks like, this was with the open project folder option.

When i remove the project folder and try and open the folder titled src (that holds all of the libraries that i am trying to reference in my code), and the ide still compiles everything.

I also do not have a menu item titled “open folder” , i only have “open” and “add project folder”

Strange, I have this

I checked for updates to see if that was it and it tells me im running the current version, 1.18.0. Could be that i’m running mac OS?

However, that menu button allows me to open folders. When i open the src folder it prompts me with a question,

(to get to this menu i have to close all windows, open new window, open src folder (which opens the code file i have attach even though its not in the same folder), remove project folder src, reopen src folder)

If i click the left option, i get the same issue. It compiles everything.

If i click the right option, it opens a new window. The new window has the same issue, the old window when i try compiling i get this error. This make sense because their is no defined path.