particle_temp_sensor.ino
#include <Adafruit_DHT.h>
#include "Adafruit_DHT.h"
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE);
void setup() {
dht.begin();
}
void loop() {
delay(60000); // Wait a minute between measurements.
float h = dht.getHumidity();
float f = dht.getTempFarenheit(); // Read temperature as Farenheit
Particle.publish("temp", String::format("%4.1f", f), PRIVATE);
}