Particle Boron Flashing RED SOS with DHT22

Hi All,

Started see something weird today (tried multiple devices). Compiling/Flashing firmware using CLI.
The following code is causing flashing Red SOS Led and Restarting every ~20 seconds.

#include "DHT22Gen3_RK.h"

SerialLogHandler logHandler;


// How often to check the temperature in humidity in milliseconds
const unsigned long CHECK_INTERVAL = 5000;
unsigned long lastCheck = 0;

// The two parameters are any available GPIO pins. They will be used as output but the signals aren't
// particularly important for DHT11 and DHT22 sensors. They do need to be valid pins, however.
DHT22Gen3 dht(A4, A5);

void sampleCallback(DHTSample sample);

void setup() {
    pinMode(D4, OUTPUT);
    digitalWrite(D4, HIGH);

void loop() {

	if (millis() - lastCheck >= CHECK_INTERVAL) {
		lastCheck = millis();

		dht.getSample(A2, sampleCallback);


void sampleCallback(DHTSample sample) {
	// The callback is called at loop() (from dht.loop()) so it's safe to do anything you would normally
	// do at loop time (like publish) without having to worry about thread concurrency.

	if (sample.isSuccess()) {"sampleResult=%d tempF=%.1f tempC=%.1f humidity=%.1f tries=%d",
				(int) sample.getSampleResult(), sample.getTempF(), sample.getTempC(), sample.getHumidity(), sample.getTries() );"dewPointF=%.1f dewPointC=%.1f",
				sample.getDewPointF(), sample.getDewPointC() );
	else {"sample is not valid sampleResult=%d", (int) sample.getSampleResult());

I have another device that’s been running the above code for a month just fine. Is it something with firmware compiling against a specific version using CLI? @rickkas7

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.