Martin Exner in MATLAB Answers
上次活动时间: 2025-5-14

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
Jane in Discussions
上次活动时间: 2024-12-9

I am using the ELECFREAKS IOT:bit Expansion Board with micro:bit to record data, it worked normally but in this week I tested again, and discover no data is uploaded to the channel ie.no entries in channel. The code in makecode are the same as before and the wifi is work, I cannot find the reason that cause this failure. Cannot upload data to ThingSpeak through IOT:bit Expansion Board Please share the code used on the device. We may be able to provide guidance based on looking at the code. Please replace any API keys in the code with API_KEY_PLACEHOLDER prior to sharing the code. input.onButtonPressed(Button.A, function () { if (ESP8266_IoT.wifiState(true)) { basic.showIcon(IconNames.Yes) basic.pause(1000) } else { basic.showIcon(IconNames.No) basic.pause(1000) } }) input.onButtonPressed(Button.B, function () { ESP8266_IoT.connectThingSpeak() ESP8266_IoT.setData( "API_KEY_PLACEHOLDER", pins.analogReadPin(AnalogReadWritePin.P1), Environment.ReadSoilHumidity(AnalogPin.P2) ) ESP8266_IoT.uploadData() basic.showIcon(IconNames.Heart) if (ESP8266_IoT.thingSpeakState(true)) { basic.showIcon(IconNames.Meh) } }) OLED.init(128, 64) ESP8266_IoT.initWIFI(SerialPin.P8, SerialPin.P12, BaudRate.BaudRate115200) ESP8266_IoT.connectWifi("your_ssid", "your_pwd") basic.forever(function () { OLED.writeStringNewLine("Light: " + pins.analogReadPin(AnalogReadWritePin.P1)) OLED.writeStringNewLine("Soil: " + Environment.ReadSoilHumidity(AnalogPin.P2)) if (pins.analogReadPin(AnalogReadWritePin.P1) < 300) { pins.digitalWritePin(DigitalPin.P15, 1) } else { pins.digitalWritePin(DigitalPin.P15, 0) } if (Environment.ReadSoilHumidity(AnalogPin.P2) < 50) { pins.servoWritePin(AnalogPin.P16, 0) } else { pins.servoWritePin(AnalogPin.P16, 180) } OLED.writeNumNewLine(Environment.ReadLightIntensity(AnalogPin.P1)) basic.pause(1000) OLED.writeNumNewLine(Environment.ReadSoilHumidity(AnalogPin.P2)) basic.pause(1000) }) This is the code that I use, I have checked that the connection with ThingSpeak is successful I believe the library you are using is this one. It is not setting the requires headers, namely "Host". Without this, the request is being rejected by the server. Note that the "Host" header is required for valid HTTP/1.1 requests, per RFC 2616. Please get in touch with the author of the library to update it. I have opened an issue in the original library for the authors to fix. @Jane: See the response here. Are you still having an issue after updating to the latest version? microbit makecode
Dick in Discussions
上次活动时间: 2024-12-7

I am using a micro:bit device with ESP8266 for a IOT project, but cannot connect thingspeak recently. The conncection is unstable, I can hardly connect to thingspeak for days, somehow it works last night for 30 mins and then it fails. The program does not change and I have included a 25 sec delayed between each data sending. Please advice why and how to fix it. Thank you. Unstable data receiving from Micro:bit device Can you share your program? Specifically,the AT commands used to send the data to ThingSpeak? Please do _not_ share your API keys. esp8266 micro:bit
pravin vaz in MATLAB Answers
上次活动时间: 2023-3-1

Hi all I am trying to use Grafana dashboard to show my Thingspeak data which is generated by a Microbit IoT device. The data logs perfectly to the thingspeak website, and the GET command works fine as I copied and pasted into a new browser and i got json data (channel is public). However, when I try connect my grafana dashboard and add the JSON channel feed (through simple JSON a plugin), I get a error in Grafana (although it says connection established). The error is: <!DOCTYPE html> <html> <head> <title>We're sorry, but something went wrong (404)</title> <style type="text/css"> body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } div.dialog { margin: 3em auto 0 auto; } h1 { font-size: 100%; color: #f00; line-height: 1.5em; } </style> </head> <body> <!-- This file lives in public/404.html --> <div style="padding-top: 50px"> <img src='/thingspeak_logo_white.png' width='200' height='35' style='background-color: #2f7eb2; padding: 10px;' /></div> <div class="dialog"> <h1>The page you were looking for doesn't exist.</h1> <p>You may have mistyped the address or the page may have moved.</p> </div> </body> </html> I am using a windows machine. Regards
pravin vaz in MATLAB Answers
上次活动时间: 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.
Dick Chan in Discussions
上次活动时间: 2022-7-23

Dear all, I am using the micro:bit with ESP-01s and the CO2 sensor to monitor indoor air quality. Thingspeak cannot show the data eventhough the ESP is connected to the wifi (checked with the router). Failed to talk to my ESP even I have setup a new channel many times. Can anyone advise me what to do? Thank you for your help in advance. ESP-01 communication problem with thingspeak using a micro:bit Share a code snippet please. Consider using the <https://github.com/mathworks/thingspeak-arduino ThingSpeak library> . It has good examples as well. But first, see if you can update your channel using the web browser. If you click the API keys tab on your channel you will see the format for updating in the browser address window. Me too, my micro:bit data not showing on the thingspeak dashboard. micro:bit esp-01s
pravin vaz in Discussions
上次活动时间: 2022-5-31

Hi all, I am trying to create a complete learning unit online using laravel. The unit of work is in Internet of Things. Hardware will be provided to students - Its a microbit plus the DFRobot Environment science expansion kit (https://www.dfrobot.com/product-2194.html) . All the video tutorials and project work is assigned via the laravel lms.They will log into the lms via their microsoft logins. My next step is to simplify the process of users accessing the mathworks account. I would like to pre assign channels for students with API keys to write sensor values from each of their microbit shields to the cloud. Has anyone tried to do this or has any suggestions how to? The advantages of students having their own channels on my account is for me to monitor how they are progressing. These are year 9 students at high school who have never done any IoT or mathworks/thingspeak related content before. User generation for channels for IoT Shield You can use the create channel API to create new channels for your students. The response to the request has the API kiy and channel ID in it. microbit dfrobot iot sensors api laravel lms
Matt Soh in MATLAB Answers
上次活动时间: 2021-12-27

I want to be able to download data from thingspeak into microbit, as well as uploading data into thingspeak. I am using an iot:bit. Is it possible?
Essa Alsolami in MATLAB Answers
上次活动时间: 2021-9-7

plz i desprately need help. I have created channels on Thingspeak received data like temprature and light sensor, the microbit connected to intenet via ESP266. what i would like to know is that, could i send messages or commands to micrbit for controlling light ON and OFF? using thingspeak MQTT suscriber or TalkBack. if yes how could that be done ? Thank you in advance.
pravin vaz in MATLAB Answers
上次活动时间: 2020-5-20

Hi I am a newbie to Thingspeak. I am testing the Microbit SmartScience IoT kit which uses Thingspeak to display data(https://learningdevelopments.co.nz/products/smart-science-iot-kit-for-micro-bit) I am trying to do two things for which I couldn't find the right resource. 1) Post information from each field to Twitter. I have setup my ThingTweet account with my Twitter. What exactly is the next step and what information is to be used on the HTTP page? I couldn't find a straightforward resource on the same. 2) I would like to display all the fields from my (private) channel onto my personal blog which uses wordpress. How would I pull the data out of here to post regularly onto my page? Kind Regards

关于 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.