Okay, this is weird. I am using a Particle Photon to send data to Ubidots. The photon is pulling temperature and humidity values from a DHT22. This data is being displayed on a web page and so I know that the code and associated variables are capturing data properly.
The strange thing is that when I send the data to Ubidots, I only see a value of -2. Clearly there is something weird going on and I am not sure why I am seeing this. Here is a snippet of code where the value is created and sent. Note that I am only sending temperature to Ubidots in this example, but I see -2 if I send humidI as well. I have also tested sending tempF and humidF with the same result. As an FYI, the Web page is displaying tempFi and humidI.
if (Time.now() - PreviousTime > interval){
PreviousTime = Time.now();
DHT.acquireAndWait();
tempF = DHT.getFahrenheit();
tempFi = (int) tempF;
humidF = DHT.getHumidity();
humidI = (int) humidF;
tempupdate = true;
request.body = "{\"value\":" + String(tempFi) + "}";
http.post(request, response, headers);
}
Does anyone have any idea what is going on here? I have also posted a question over on the Particle forum as well.
Thank you!