I have flashed firmware to the Spark Core but I am having a hard time with keeping it online and stable.
I really don’t think it has anything to do with the firmware but I can post what I have anyway.
What it’s doing is at any random time, usually shortly after being online and breathing cyan, it cuts out and goes into quickly flashing cyan. After that, it flashes green quickly until the device reboots.
What I have done is factory reset the device and reflashed the firmware numerous times but the problem keeps coming back.
Here is what I am flashing to it:
// Include Blynk API
#include "blynk/blynk.h"
#define BLYNK_PRINT Serial
// Blynk cloud API access token
char auth[] = "0123456789abcdef";
// Constructor for terminal widget - remote debug (if local, use Serial)
WidgetTerminal terminal(V3);
void setup() {
Serial.begin(9600);
delay(5000); // Allow board to settle
Blynk.begin(auth);
pinMode(A0, INPUT);
// Determine if this is subject to daylight savings--if not, set it manually for the given month (int)
Time.zone(-6);
}
void loop() {
Blynk.run();
Blynk.virtualWrite(V1, temperature());
// Samples analog readings from TMP36 on the top of every hour
if((Time.minute() == 0) && (Time.second() == 0)) {
int reading = temperature();
}
}
int temperature() {
double reading = analogRead(A0);
float tempC = (((reading * 3.3)/4095) - 0.5) * 100;
int tempF = (tempC * 1.8) + 32;
Serial.println(tempF); // for debugging - remove when finalized
return tempF;
}
The only thing I have connected to it is a TMP36 with a 103 ceramic cap and a 47kohm resistor (RC filter) to ground and I am powering it through the 3v3* pin. I also have it connected via USB for power.
I have 3 separate Cores and this one is acting different compared to the others. I’ll try to flash it to another Core that I have and I will post the results on this thread.
It’s a very basic app that I have written and there are no frills on the hardware peripheral side. I really don’t think it is anything to do with that and I am worried my Spark Core is about to go tango uniform.
What should I do?