I am not able to load a program OTA using the thingspeak library. While doing this I get a series of red, blue and white flashes. here is no discernible pattern. Here is a copy of the code.
I would like to upload a short video but not available
Have any suggestions?
// This #include statement was automatically added by the Particle IDE.
#include <ThingSpeak.h>
unsigned long myChannelNumber= !!9247;
const char * myWriteAPIKey = "!!QE6YDDSA2EIML4";
#include "Adafruit_DHT.h"
// Example teting sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
#define DHTPIN 2 // what pin we're connected to
// Uncomment whatever type you're using!
//#define DHTTYPE DHT11 // DHT 11
#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
// Connect pin 1 (on the left) of the sensor to +5V
// Connect pin 2 of the sensor to whatever your DHTPIN is
// Connect pin 4 (on the right) of the sensor to GROUND
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
Serial.println("DHTxx test!");
dht.begin();
}
void loop() {
// Wait a few seconds between measurements.
delay(2000);
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a
// very slow sensor)
float h = dht.getHumidity();
// Read temperature as Celsius
float t = dht.getTempCelcius();
// Read temperature as Farenheit
float f = dht.getTempFarenheit();
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
// Compute heat index
// Must send in temp in Fahrenheit!
float hi = dht.getHeatIndex();
float dp = dht.getDewPoint();
float k = dht.getTempKelvin();
Serial.print("Humid: ");
Serial.print(h);
Serial.print("% - ");
Serial.print("Temp: ");
Serial.print(t);
Serial.print("*C ");
Serial.print(f);
Serial.print("*F ");
Serial.print(k);
Serial.print("*K - ");
Serial.print("DewP: ");
Serial.print(dp);
Serial.print("*C - ");
Serial.print("HeatI: ");
Serial.print(hi);
Serial.println("*C");
Serial.println(Time.timeStr());
/// ThingSpeak.writeField(myChannelNumber, 1, voltage, myWriteAPIKey);
ThingSpeak.writeField(349247, 1, f, "!!!!UB2QE6YDDSA2EIML4");
//thingspeak.writefield(myChannelNumber,1,f,myWriteAPIKey);
//thingspeak.writefield(myChannelNumber,2,h,myWriteAPIKey);
delay (30000);
}