All,
Thanks in advance for any help.
I have been struggling with a couple of issues while setting up to do some photon code.
- My project includes developing libraries as well as a main project so I have setup the particle dev tool since that seemed easier to work with when multiple source files are involved.
Just dropping in my three files created a ton of problems… I added the #include “Particle.h” in my main and .h files to get all the built in stuff to work. I am currently getting the “build didn’t produce any binary files…” cant read the rest of the error… can somebody tell me how to view a build log? Saw some posts about adding a particle.include and particle .ignore file… did that with no change.
CODE:
main.ino
#include "blink.h"
blink blub;
void setup()
{
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("and setup");
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop()
{
// put your main code here, to run repeatedly:
blub.doABlink();
Serial.println("and looper");
delay(1000);
}
blink.h:
#include "Particle.h"
int led = D0; // You'll need to wire an LED to this one to see it blink.
int led2 = D7; // This one is the built-in tiny one to the right of the USB jack
class blink
{
public:
blink();
void doABlink();
};
blink.cpp
#include "blink.h"
blink::blink()
{
return;
}
void
blink::doABlink()
{
digitalWrite(led, HIGH); // Turn ON the LED pins
digitalWrite(led2, LOW);
delay(100); // Wait for 1000mS = 1 second
digitalWrite(led, LOW); // Turn OFF the LED pins
digitalWrite(led2, HIGH);
delay(200); // Wait for .5 second in off mode
}
would appreciate any help or simple example of doing a 3 file project on windows 10 using particle dev.
- Serial monitor is not working… more to the point, it seems that there is no serial output happening on the photon since it isn’t even working with putty. Serial output works fine with particle build.
Hope there is a simple answer out there. I’m sure there is or the whole community would be freaking out… which means this is likely my error!
thanks for your help.