Afternoon Everyone, Looking for some help with my Arduino/Thingspeak sketch. To give you an idea I have a Lora Sensor sending data to a Lora/Uno receiver, the data I receive is two strings, one for DO and one for Temp, in the parsepacket section below I convert the string to floats and use these as my fields for Thingspeak. Currently the code allows a connection to Thingspeak, it also correctly associates the DO and Temp float variables with corresponding graphs on the channel. However after the initial WiFi connection all that happens is zero is written to both graphs and only once, another write will not happen untill I reboot the Arduino. I'm pretty certain that the order of my Loop is wrong. My expected results are to write Temp and DO to Thingspeak every 30 seconds, with actual values, not 0. Currently a write happens once and Temp and DO are Zero, despite the packets being received correctly with actual values. If I can clarify anything or better explain then please feel free to ask, I'm fairly new to this. TIA. AC if true #include <ESP8266WiFi.h> #include <ThingSpeak.h> #include <LoRa.h> #include <SoftwareSerial.h> #define nss D10 #define rst D14 #define dio0 D2 // WiFiClient client; // const char* ssid = "myssid"; const char* password = "mypassword"; // char thingSpeakAddress[] = "api.thingspeak.com"; unsigned long channelID = mychannelid; char* readAPIKey = "myapi"; char* writeAPIKey = "myapi"; unsigned long lastTime = 0; unsigned long timerDelay = 30000; unsigned int dataFieldOne = 1; unsigned int dataFieldTwo = 2; // float DO; float temp; // void setup() { WiFi.mode(WIFI_STA); ThingSpeak.begin(client); LoRa.setPins(nss, rst, dio0); Serial.begin(115200); while (!Serial); if (!LoRa.begin(868E6)) {//914E6 Serial.println("Starting LoRa failed!"); while (1); } } // void loop() { int packetSize = LoRa.parsePacket(); if (WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect"); while (WiFi.status() != WL_CONNECTED) { WiFi.begin(ssid, password); delay(5000); if (packetSize) { Serial.print("packetSize = "); Serial.println(packetSize); parseLoRaPacket(); } ThingSpeak.setField(1, DO); ThingSpeak.setField(2, temp); int x = ThingSpeak.writeFields(channelID, writeAPIKey); // if (x == 200) { Serial.println("channel update succesful."); } else { Serial.println("Problem updating channel."); } } } } // void parseLoRaPacket() { String lora_data; // String as local variable // while (LoRa.available()) { lora_data = LoRa.readString(); Serial.print(lora_data); // int strIndex = lora_data.indexOf("TEMP: "); if (strIndex > -1) { int startPos = strIndex + strlen("TEMP: "); temp = lora_data.substring(startPos).toFloat(); Serial.println(temp); } strIndex = lora_data.indexOf("DO: "); if (strIndex > -1) { int startPos = strIndex + strlen("DO: "); DO = lora_data.substring(startPos).toFloat(); Serial.println(DO); } } } end Arduino connecting to ThingSpeak but writing data provides a zero value and only writes once. I would start by adding more delay in your loop. This code would repeatedly slam the ThingSpeak server, all updates except one every 15 seconds will be rejected. Please look at the examples provided with the ThingSpeak library. You can see them under the file > Examples > ThingSpeak menu in the Arduino IDE. There are also some other errors in the code above, with your wifi connect routine, and placement of some braces. I suggest starting over with the examples, and then add the Lora stuff in once you are successfully able to send a static value or a random number to ThingSpeak. Hi Christopher, Thanks for the response and critique, that is actually a really good suggestion. I took the opposite approach I took something that worked and tried to force thingspeak into it without understanding thingspeak itself. I'll start from the ground up as you say get a working thingspeak sketch and implement the other stuff. Thanks again. Happy to help, I hope you get your project working. Can you share any more information about the LORA receiver connected to the UNO (and what is sending the packet)? I'm intrigued. arduino sketch help thingspeak write