Can't send data to Thingspeak from Microbit DFRobot kit

조회 수: 3 (최근 30일)
pravin vaz
pravin vaz 2022년 9월 13일
답변: pravin vaz 2022년 9월 19일
Hi
I am trying to hook up the DFRobot Environment shield for Microbit (https://www.dfrobot.com/product-2194.html) . I have used it in the past at home. This time I am using it at the school where I am teaching.
I have setup a hotspot using my phone and connected the device (the wifi light goes green) and I can see the device connected on my phone.
But the data doesn't pop up on thingspeak channel. I have attached the code below. The write key is generated by Thingspeak API. The username and password are accurate to what I am using (wifi color goes green on the shield so I know its connected).
When I try ping thingspeak.com I don't get any response. Is that blocked by Thingspeak usually?
Thanks for your support. Sorry I couldn't embed the makecode code so attached a picture. But I don't really think anything is wrong with the code.

채택된 답변

pravin vaz
pravin vaz 2022년 9월 19일
The Thingspeak Configure key piece of code needs to be in the forever loop rather than onStart .

추가 답변 (2개)

Christopher Stapels
Christopher Stapels 2022년 9월 14일
편집: Christopher Stapels 2022년 9월 14일
Are you able to update the channel using the GET command in your browser address bar?
Click on your channel view and use the API keys tab to get the syntax on the right hand side for "Write a channel feed"
Also, we generally reccomend not sharing your API keys, since they are a password to channel updates of a sort. You may wish to redact the above.
  댓글 수: 1
pravin vaz
pravin vaz 2022년 9월 15일
Hi Christopher, thanks for the answer.
The GET command doesn't seem to pull any data either.
I have a strong feelings its something to do with their (DFRobot) extension library for the module and not Thingspeak. I have emailed their tech support.
That screenshot isn't my data, rather a screenshot of the tutorial they provide which is on the public domain already.

댓글을 달려면 로그인하십시오.


pravin vaz
pravin vaz 2022년 9월 18일
Phew: worked out the error.
The Thingspeak Configure key piece of code needs to be in the forever loop rather than onStart .
  댓글 수: 1
Christopher Stapels
Christopher Stapels 2022년 9월 19일
Thanks for letting us know. Can you put it in the answer section and accept the answer please?

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 ThingSpeak에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by