This works:
Code: Select all
void loop() {
if (testFeed.send(12)) {
Serial.println(F("Wrote value to feed"));
}
else {
Serial.println(F("Error writing value to feed!"));
}
delay(10000);
}
Code: Select all
bool Adafruit_IO_Feed::send(float value) {
// Convert float to string using scientific notation, then send the value
// (being careful not to quote it).
memset(_converted, 0, sizeof(_converted));
#if defined(ARDUINO_ARCH_AVR)
// Use BANNED dtostre function on AVR platforms.
dtostre(value, _converted, 10, 0);
#else
// Otherwise fall back to snprintf on other platforms.
snprintf(_converted, sizeof(_converted)-1, "%f", value);
#endif
return _adapter->send(_name, _converted, _key, false);
}