Elecron & Particle Web IDE

Hello everyone …I am not sure whats going on with the CLI Web IDE (ScruffR: corrected terminology) …I don’t know why but when I try a sketch …Any sketch I get the following without even trying to flash

src/temperature.cpp:1:31: fatal error: photon-thermistor.h: No such file or directory
 #include "photon-thermistor.h"
                               ^
compilation terminated.
make[1]: *** [../build/target/user/platform-10src/temperature.o] Error 1
make: *** [user] Error 2

I can change devices to a photon and the sketch works …Anyone ?? as well I could use a bit of a helping hand with flashing the electron with my PC .The command prompt doesn’t seem to be able to find my sketch…

below is the simple thermistor code

#include "photon-thermistor.h"
#include "application.h"
Thermistor *thermistor;

void setup() {
  // For an NTC (negative temperature coefficient) thermistor only!
  // CONSTRUCTOR PARAMETERS:
  // 1. pin: Photon pin
  // 2. seriesResistor: The resistance value of the fixed resistor (based on your hardware setup)
  // 3. adcMax: The maximum analog-to-digital convert value returned by analogRead (Photon is 4095 NOT the typical Arduino 1023!)
  // 4. thermistorNominal: Resistance at nominal temperature (will be documented with the thermistor, usually "10k")
  // 5. temperatureNominal: Temperature for nominal resistance in celcius (will be supplied with the thermistor, assume 25 if not stated)
  // 6. bCoef: Beta coefficient of the thermistor; usually 3435 or 3950 (will be documented with the thermistor)
  // 7. samples: Number of analog samples to average (for smoothing)
  // 8. sampleDelay: Milliseconds between analog samples (for smoothing)
  thermistor = new Thermistor(A1, 10000, 4095, 10000, 25, 3950, 5, 20);
}

void loop() {
  float tempF = thermistor->readTempF();
  Particle.publish(String("temp"), String(tempF));
  delay(5000);
}

Hello,

Let me ping someone that might be able to help you. @rickkas7 are you able to assist?

Kyle

How are you compiling the code? Using the CLI?

Yea …With the on line CLI Web IDE …If I pick the photon to flash it compiles ok then I pick the Electron …withput changing anything and it gets an errorr …Having another problem …my photons quit particle publishing … Ghosts ??

You are saying that particle compile photon . works and particle compile electron . doesnt?

Yes thats exactly it …when i check the code i get the error its odd

What is the output of ls -l and what error is it throwing?

Kennith, Im on the particle.io CLI Web IDE, not the computer cli

I wonder if you are talking about the Web IDE at https://build.particle.io

Can you share the link of the tool that you are exactly using?

1 Like

CLI stands for Command Line Interface.
I guess you mean IDE (Integrated Development Environment).

Using the wrong terms doesn’t help understanding your problem :wink:

I’m not sure what this means either.
When we talk about CLI it’s always on a “personal” computer but it uses the cloud build farm for building.

But for testing, remove the #include "application.h" line and insert #include "Particle.h" before #include "photon-thermistor.h"

Yes sorry IDE

Its Doing it agai
n …src/my_house_tempcontrol.cpp:5:18: fatal error: DS18.h: No such file or directory
#include “DS18.h”
^
compilation terminated.
make[1]: *** […/build/target/user/platform-10src/my_house_tempcontrol.o] Error 1
make: *** [user] Error 2

Compiles fine when I pick my photons and I pick the electron …this is the error .Doesn’t matter what sketch I use …As long as there is an #INCLUDE in the sketch this is what happens… any thoughts ??

What system version are you targeting for your Electron?

0.4.8

Doesn’t matter what system target I try is the same result

Yes this does matter as libraries v2.0 are not supported pre 0.5.3 - so 0.6.2 should work (and does for me)

So whats the fix ?

You could share a project snapshot to have a look at and maybe fix to share it back to you.

Love to How do I do that ??

Figured it out
https://go.particle.io/shared_apps/5922fdefca5cbaee0c000b76