Walter Diego Spaltro in Discussions
最後のアクティビティ: 2022 年 3 月 31 日

Hi all, don't upload data to Thingspeak (sorry my english) I'm build this counter geiger <https://www.electronics-lab.com/project/new-improved-geiger-counter-now-wifi/> but not upload data, only appear this to my channel: 29T23:17:58Z","entry_id":112,"field1":null},{"created_at":"2022-03-29T23:22:58Z","entry_id":113,"field1":null},{"created_at":"2022-03-29T23:27:58Z","entry_id":114,"field1":null},{"created_at":"2022-03-29T23:32:58Z","entry_id":115,"field1":null},{"created_at":"2022-03-30T18:43:09Z","entry_id":116,"field1":null},{"created_at":"2022-03-30T19:00:19Z","entry_id":117,"field1":null},{"created_at":"2022-03-30T19:05:19Z","entry_id":118,"field1":null},{"created_at":"2022-03-30T19:10:19Z","entry_id":119,"field1":null}]} The code I'm use is there <https://www.electronics-lab.com/project/new-improved-geiger-counter-now-wifi/> sorry it does not allow me to upload it because it is long Don't upload data to Thingspeak That's a neat demo, thanks for sharing, I think Ill make one! Are you sure there is data coming from the detector? Can you see data on the serial monitor? Try hardcoding a number in your code instead of using a variable. If the hard coded number works, then the problem is the data in your variable. Also, I cant really see in the code where it handles the POST to ThingSpeak. Can you show that part of the code? (just the HTTP post part, and possible where the data is formed) ok found the code <https://github.com/pra22/GC-20/blob/master/src/main.cpp here> . In the section below, replace all the variables with string numbers, for example: String(averageCount) --> "22.34" and so on. Then watch your ThingSpeak channel and see if those numbers show up. that will help isolate the problem. if (deviceMode) // deviceMode is 1 when in monitoring station mode. Uploads CPM to thingspeak every 5 minutes { currentUploadTime = millis(); if ((currentUploadTime - previousUploadTime) > 300000) { previousUploadTime = currentUploadTime; if (client.connect(server, 80)) { String postStr = channelAPIkey; postStr += "&field2="; postStr += String(averageCount); postStr += "\r\n\r\n"; char temp[50] = "X-THINGSPEAKAPIKEY:"; strcat(temp, channelAPIkey); strcat(temp, "\n"); client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print(temp); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); Serial.println(postStr); } client.stop(); } Did you export only field 1 above by the way? The code that I found writes to field 2. Make sure field 2 is enabled. Hi Christopher, thanks for your answer, I solved it with your answer of activating "field2", and now it works fine, but it restarts after I turn it off and I have to reprogram it to make it work again. Tell me what is the problem? Thanks a lot!!! geiger upload data

ThingSpeak について

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.

モデレーター