// Check the status of the read operation to see if it was successful
statusCode = ThingSpeak.getLastReadStatus();
if(statusCode == 200){
Serial.println("Counter: " + String(count));
}
else{
Serial.println("Problem reading channel. HTTP error code " + String(statusCode));
}
1条答案
按热度按时间0yycz8jy1#
是的,ThingSpeak Arduino库有一个内置操作:
ThingSpeak.getLastReadStatus()
下面是一些获取最后一个状态并对其进行测试的代码: