No connection. Micro:bit IoT kit to Thingspeak

30 ビュー (過去 30 日間)
Martin Exner
Martin Exner 2023 年 3 月 7 日
コメント済み: rich yates 2024 年 1 月 15 日
Hi.
I have issues getting live data in ThingSpeak working with Elecfreaks IoT-kit. Is this a known issue? I have had it working before, so its not my code thats the problem :)
Regards
Martin
  2 件のコメント
Christopher Stapels
Christopher Stapels 2023 年 3 月 7 日
編集済み: Christopher Stapels 2023 年 3 月 7 日
Can you show us parts of the code you are using to connect and write? Are you using MQTT or REST API?
Does your device have any monitoring? Are you getting any response at all from the device?
Martin Exner
Martin Exner 2023 年 3 月 8 日
Yes. This is the code from makecode:
Regards
Martin Exner

サインインしてコメントする。

回答 (6 件)

Christopher Stapels
Christopher Stapels 2023 年 3 月 8 日
編集済み: Christopher Stapels 2023 年 3 月 8 日
You seem to have no delay between requests. This will result in you continuously querying the ThingSpeak server, and eventually you will be blocked for abuse. The minimum time between posts is 1 second for a paid user and 15 seconds for a free user. Please add some delay.
  2 件のコメント
Martin Exner
Martin Exner 2023 年 3 月 13 日
Hi Christopher.
I've also tried with delay (see code below) but still no connection to Thingspeak. Could it be that my account already has been banned?
Regards
Martin
Christopher Stapels
Christopher Stapels 2023 年 3 月 13 日
I dont think you have been blocked yet. Does anything at all show up in your account? Perhaps try looking at the export recent data button at the top of your channel view. Does the number of entries increase?
Are you able to test the connection part of the code above to see if it is successful (say blink an led or have serial output? )
Im not sure how the pink blocks on the right in your diagram interact but I only see 2000 ms of delay on the loop on the left. Make sure the total delay is at least 15 seconds unless you have a paid ThingSpeak license.
Perhaps try a different network, or use your phone hotspot to conenct to test if it is your WiFi.

サインインしてコメントする。


Martin Exner
Martin Exner 2023 年 3 月 13 日
Hi Christopher
I have embedded the wifi-check and thingspeak-check. Wifi works, thingspeak says no connection. I have downloaded the data export and no entries.
I have also tried the 15 seconds delay, still no connection. On a sidenote, we have had the set working for years (thingspeak and IoT from Elecfreaks) but half a year ago it stopped working.
Regards
Martin

Christopher Stapels
Christopher Stapels 2023 年 3 月 13 日
Can you try updating your channel with your browser address bar? Use the format shown on the API keys tab of your channel.
This makes sure the API Keys havent changed and the account it still active.
  2 件のコメント
Martin Exner
Martin Exner 2023 年 3 月 13 日
Hi Christopher
I've updated, and API key is still the same.
Christopher Stapels
Christopher Stapels 2023 年 3 月 13 日
Where do you see "thingspeak says no connection"? Is there a serial monitor?

サインインしてコメントする。


Martin Exner
Martin Exner 2023 年 3 月 13 日
Hi Christopher.
Yes, I made a check on Thingspeak-connection in my makecode. You can see the code here: https://makecode.microbit.org/_cEj4XYXjoDu4
Regards
Martin
  5 件のコメント
Robert Parks
Robert Parks 2023 年 9 月 12 日
Hi Christopher and Martin,
After experiencing the same problems as Marin, and incorporating your advice regarding delays and troubleshooting notifications, I managed to get it to work. The key, I think, is to get the code to keep looping until ESP8266 successfully talks to the router. This takes a minute or two. Here's what worked for me:
All my best,
Robert Parks
MIT App Inventor
rich yates
rich yates 2024 年 1 月 15 日
I had the same issue and your solution worked perfectly! Thank you for sharing it.

サインインしてコメントする。


Chris KM
Chris KM 2023 年 3 月 14 日
Hi, I'we tried Martins programming. Added OLED to check.
I have the same problem.
The program stops when connecting to ThingSpeak
  1 件のコメント
Dick
Dick 2023 年 4 月 14 日
I have encountered the same issue here. I use makecode and ESP8266 and they seems not communicating with the thingspeak.
I have tried the HTTP method (address bar), it works. Only the makecode part is not working.
regards
Dick Chan

サインインしてコメントする。


Christopher Stapels
Christopher Stapels 2023 年 4 月 14 日
Do you know anyway to expose what the steps in the make code or the ESP firmware are doing? I know how to connect an ESP8266 directly to ThingSpeak, and there are no issues with that process at present, but I dont know what the micro bit is specifically doing with the esp8266.
  9 件のコメント
SAM YUK
SAM YUK 2023 年 5 月 12 日
Hi Dick, sorry for the late response. So, have you found the way to fix the problem?
I have tried microbit v1.5 and 2.0. I also tried two different ESP8266 from kittenbot and emakefun.
It showed that it can connect to the wifi but none of the data was uploaded to thingspeak platform.
Robert Parks
Robert Parks 2023 年 9 月 12 日
Sam and Dick,
See image above for some Makecode that worked for me.
Robert

サインインしてコメントする。

コミュニティ

その他の回答  ThingSpeak コミュニティ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by