I am new to the platform. Thank you for this - a great step on Photon (with fw 0.6.1).
Unfortunately the same code does not run on Electron with 0.6.1, (and triggers a bug in the IDE, see below). The device breaths green or breaths cyan running the code below.
When breathing cyan, nothing gets sent to papertrail, the particle.variable is not registered, and the devices never starts blinking the blue LED. So the papertrail init seems blocking.
(Insert your own paper trail dem account credentials.)
// This #include statement was automatically added by the Particle IDE.
#include <papertrail.h>
// Slow 1fps blink blue board LED on 0.6.1 Photon and Electron
int led = D7; // blue board LED
int fps = 1000;
/*
SerialLogHandler logHandler(LOG_LEVEL_WARN, { // Logging level for non-application messages
{ "app", LOG_LEVEL_ALL } // Logging level for application messages
});
*/
//
PapertrailLogHandler papertailHandler("logsX.papertrailapp.com", XXXXX, "PapertrailSimpleDemo");
void setup() {
Particle.variable("fps(ms)", fps);
pinMode(led, OUTPUT);
Log.trace("Starting, fps(ms): ", fps);
}
void loop() {
digitalWrite(led, HIGH);
delay(fps);
digitalWrite(led, LOW);
delay(fps);
}
It also triggers a wrong indication in the IDE:
When breathing cyan the device is listed as online in the console but variables does not show (“no variables registered”).
If I flash to the device breathing cyan via the IDE, the IDE indicates flashing is working fine but the device does not actually get flashed. Nothing shows up in the console log if active during the flashing.
So the device is probably online but can not be interacted with due to blocking code, so the “flash succesful” message is wrong:
followed by

This is on Mac OS 10.12.4 (16E195) with Safari Version 10.1 (12603.1.30.0.34)
I would appreciate to know if others have the lib running on Electron, thanks. It is a great debug option to have!