Veerasai in Discussions
上次活动时间: 2025-7-23

I'm facing an issue where my Thinkspeak graph is not displaying, even though I'm using exactly the same code as my friend. The code works perfectly in their Thinkspeak account, but not on mine. I've checked the API keys, channel settings, and data formats, but everything seems similar. Has anyone else faced this problem, or do you have tips on what to check next? Suggestions are welcome! Thinkspeak Graph Not Displaying While Same Code Works for Friend I would focus on the data formats. Perhaps try to read thier data instead of yours and then operate on it. Often times, spaces or weird characters in just one entry can muck up a whole read when MATLAB tries to figure out if something is a string or a number for example. The ThingSpeak platform is deterministic though, if everything is truly exactly the same, the output will be the same. Feel free to share some examples here, we can look at your stuff and see if we spot the issue. thinkspeak troubleshooting iot
Hans Scharler in Blogs
上次活动时间: 2024-12-19

IoT has uses in all types of industries. Personally, I use ThingSpeak in about 8 different projects around my house.  ThingSpeak’s ability to help you easily share your data and insights from the data analysis online is used in The Gunma Industrial Technology Center in Maebashi, Japan. Read the stor...
Dion Guek in MATLAB Answers
上次活动时间: 2024-6-4

This string of code is taken from the thingSpeak documentation for matlab. I just copy and paste but still got this error. I would very much appreciate it if anyone can tell me where i did wrong <</matlabcentral/answers/uploaded_files/94486/error.JPG>>
Mukhtar Hussain in MATLAB Answers
上次活动时间: 2024-4-25

I want to collect the AD8232 ECG sensor data through Arduino and ECG sensor AD8232 then, send that collected ECG data to IOT website ThingSpeak . Can somebody provide me with a proper Arduino code for sending the ECG sensor data to ThingSpeak website !
Ege Hassürücü in Discussions
上次活动时间: 2024-3-26

Hello Everyone, I'm running an IoT project at my university using a free . Basically, my system uploads the sensor data to 4 different fields of a ThingSpeak channel and I'm reading from or writing to the channel through Simulink. I have a few questions regarding this topic: I'm trying to upload to the server every 3 seconds (which seemed to be providing the best results so far). Since the channel only accepts data transmit every 15 seconds, what is the optimized upload interval rate to match the interval rate of the channel? Because otherwise I have realized that my interval rate can go up to 1min sometimes for some reason. Is reading from/writing to the channel through simulink while the system is uploading data to the channel slow down th whole process? What is your overall suggestion in this case? I'm excited to hear your suggestions and experiences! Regards, Ege Does reading data from Simulink, slow down my server upload? I would prefer if you can stop trying to update every 3 seconds. This can result in a lot of wasted server time for us. Though your model may be putting other delays in there, Im not sure how to profile your model to be sure. Maybe Ill ask my Simulink firends about model profiling. I do recall having a similar issue with some Simulink models that I had made, Like this solar tracker. I recall there are settings in the model to change the timing to be closer to real time.. But I cannot report the details here off the top of my head. If you figure it out, please let us know here. For #2 are you asking if adding ThingSpeak can impede your model performance? Hi @Christopher Stapels, I solved the issue, thanks for your quick response! Also, reading the data from simulink doesn't seem to be effecting the performance of the channel now so far. The main issue was how i create the http request, in the new version I used your ESP32 library and now I'm able to update every 15.5 seconds. Here are the old and new versions: Old version: void loop() { unsigned long currentMillis = millis(); unsigned long interval = currentMillis - previousMillis; if (interval > UPLOAD_RATE) { // Create HTTP request String http_str = "GET /update?api_key=" + Apikey + "&field1=" + String(messageData1) + "&field2=" + String(messageData2) + "&field3=" + String(messageData3) + " HTTP/1.1\r\n"; http_str += "Host: " + server + "\r\n"; http_str += "Connection: close\r\n\r\n"; if(WiFi.status() != WL_CONNECTED) { Serial.print("Wifi connection failed. Attempting to reconnect..."); connectToWiFi(); delay(5000); } else { Serial.println("Connected to WiFi\n"); // Connect to the ThingSpeak server connectToThingSpeak(); // Make the HTTP request client.print(http_str); client.stop(); previousMillis = currentMillis; // Update the last time the action was performed } } delay(100); } void connectToThingSpeak() { if (client.connect(server.c_str(), 80)) { Serial.println("Connected to ThingSpeak server"); } else { Serial.println("Connection to ThingSpeak server failed"); } } New version: void loop() { unsigned long currentMillis = millis(); unsigned long interval = currentMillis - previousMillis; if (interval > UPLOAD_RATE) { ThingSpeak.setField(1,messageData1); ThingSpeak.setField(2,messageData2); ThingSpeak.setField(3,messageData3); ThingSpeak.setField(4,trialMessage); ThingSpeak.writeFields(CHANNELID,APIKEY); Serial.println("Data uploaded to the ThingSpeak server."); previousMillis = currentMillis; // Update the last time the action was performed } delay(100); } simulink interval read write iot
Hans Scharler in Blogs
上次活动时间: 2023-11-27

The MATLAB AI Chat Playground was launched on the MATLAB Central community at the end of November. I recently got the chance the interview the chatbot about ThingSpeak. I was curious how much it knew about building IoT projects on ThingSpeak and data analysis with MATLAB. Here are some excerpts fro...
Christoffer Veng in MATLAB Answers
上次活动时间: 2023-9-22

So I've made a small weather thingy that reports various data to ThingSpeak. How will I go about making a Matlab Analysis that finds daily rainfall at midnight? The counter and hence the data is an ever growing variable (mm)... I'm in all aspects of the word new to this Matlab thing but I did search for answers before asking this question. Examples or links to existing working code would be much appreciated. Kind regards, Chris
Hans Scharler in Blogs
上次活动时间: 2023-6-14

If you want to upgrade your ThingSpeak capabilities, have a look at the ThingSpeak repository of template codes that open in MATLAB Online. ThingSpeak has MATLAB built in to make it easy to analyze and visualize your data, but the text window for MATLAB analysis and MATLAB visualizations can be tri...
HARSHA M BHONSLE in MATLAB Answers
上次活动时间: 2023-5-18

I Need a way to code for sending a image from my mobile device to thingspeak and retriveing to the matlab pc.Is there any way to do the code?
Manfred in MATLAB Answers
上次活动时间: 2023-4-26

Hi, In my Mathwork Analysis module, the result of disp(data); shown in the command window is {"temperature"=>10.4, "windspeed"=>12.3, "winddirection"=>255.0, "weathercode"=>3, "is_day"=>1, "time"=>"2023-04-26T14:00"} How can I extract a single value, for example "windspeed"?
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
HEMANTH KUMAR REDDY in Discussions
上次活动时间: 2023-2-21

I am sending my sensor readings to thingspeak channel using raspberrry pi board but i dont know how can we send some instruction back to the raspberry pi board to control an LED or Motor or some other things. Can anyone provide some information about this? How to send some inputs to a raspberry pi board from thingspeak There are a few methods. One polling methods is to use a channel to indicate the state you want the device to be in and have the device read that channel continuously. The cheer lights examples are a good demo this kind of process. (for arduino c here, no Rpi) Second polling method you can use is Talkback, which creates and stores a command list that your device can consume. The last method is MQTT subsccribe, where the device can subscribe to a channel and ThingSpeak will push channel updates to the device. All methods are accesible via Pi, I probably reccomend the third. This example shows publish in RPi, you can adapt for subscribe. If you created a REST interface on you PI, you could also use MATLAB webread and webwrite in ThingSpeak to send data to your device, but that is the most complex method. thingspeak raspberrypi iot control things sending instructions back to t
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.
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
Sarfaraz Khan in MATLAB Answers
上次活动时间: 2022-5-19

My code is working properly but i am not recevind the data at thingspeak if i can get any help ?? here is the code #include <SoftwareSerial.h> #include <SimpleDHT.h> #include <Wire.h> #include "ThingSpeak.h" #include <LiquidCrystal_I2C.h> #include <dht11.h> #define RX 3 #define TX 2 #define dht_apin 11 // Analog Pin sensor is connected to dht11 dhtObject; String AP = "Khan"; // AP NAME String PASS = "Pakistan2"; // AP PASSWORD String API = "xxxxxxxxx"; // Write API KEY String HOST = "api.thingspeak.com"; //String HOST = "184.106.153.149"; String PORT = "80"; String field = "field1"; int countTrueCommand; int countTimeCommand; boolean found = false; int valSensor = 1; int pinDHT11 = 11; SimpleDHT11 dht11(pinDHT11); LiquidCrystal_I2C lcd(0x27, 16, 2); SoftwareSerial esp8266(RX,TX); void setup() { Serial.begin(9600); esp8266.begin(115200); sendCommand("AT",5,"OK"); sendCommand("AT+CWMODE=1",5,"OK"); sendCommand("AT+CWJAP=\""+ AP +"\",\""+ PASS +"\"",20,"OK"); } void loop() { String getData = "GET /update?api_key="+ API +"&field1="+getTemperatureValue()+"&field2="+getHumidityValue(); sendCommand("AT+CIPMUX=1",5,"OK"); sendCommand("AT+CIPSTART=0,\"TCP\",\""+ HOST +"\","+ PORT,15,"OK"); sendCommand("AT+CIPSEND=0," +String(getData.length()+4),4,">"); esp8266.println(getData);delay(2000);countTrueCommand++; sendCommand("AT+CIPCLOSE=0",5,"OK"); } String getTemperatureValue(){ dhtObject.read(dht_apin); Serial.print(" Temperature(C)= "); int temp = dhtObject.temperature; Serial.println(temp); delay(50); return String(temp); } String getHumidityValue(){ dhtObject.read(dht_apin); Serial.print(" Humidity in %= "); int humidity = dhtObject.humidity; Serial.println(humidity); delay(50); return String(humidity); } void sendCommand(String command, int maxTime, char readReplay[]) { Serial.print(countTrueCommand); Serial.print(". at command => "); Serial.print(command); Serial.print(" "); lcd.begin(); // Turn on the blacklight and print a message. lcd.backlight(); lcd.print("Tempature "); lcd.print((String)getTemperatureValue()); lcd.print("C"); lcd.setCursor(0, 1); lcd.print("Humidity "); lcd.print((String)getHumidityValue()); lcd.print("%"); delay(1000); while(countTimeCommand < (maxTime*1)) { esp8266.println(command);//at+cipsend if(esp8266.find(readReplay))//ok { found = true; break; } countTimeCommand++; } if(found == true) { Serial.println("OYI"); countTrueCommand++; countTimeCommand = 0; } if(found == false) { Serial.println("Fail"); countTrueCommand = 0; countTimeCommand = 0; } found = false; }
Hans Scharler in Discussions
上次活动时间: 2022-4-6

Hi everyone. I updated my <https://github.com/nothans/iot-debugger IoT Debugger> project on GitHub. You can use the debugger to view channel data from ThingSpeak. IoT Debugger on GitHub (updated) Thanks. I've been wanting to publish my own, now I can work with yours! javascript iot
stev1088 in MATLAB Answers
上次活动时间: 2022-3-15

I am working on a IoT application using gateways that publish data using the MQTT protocol and I am wondering if I can publish MQTT directly to MATLAB through a data broker?
Sai Teja Kavuri in Discussions
上次活动时间: 2022-3-13

hello, i have done my iot project using thingspeak as the monitoring source and its working well and good.But now i need get text message to a mobile when the field value gets reached to given threshold value and i have to get a alert text message.Is there any way to resolve my problem from thigspeak data to alert text message. Thankyou. text message alert from thingspeak Most cell providers have an SMS forwarding option. For example, is you mail xxxxxxxxxx@vtext.com (where x is your number) Verizon will forward your email message as text. You can use the <https://www.mathworks.com/help/thingspeak/alerts-api.html ThingSpeak alerts service> to generate an email and then set a rule in your inbox to fwd to the sms mail address. Alternatively, you can use a third party service such as Twilio to send a direct SMS message than can be triggered vis a REST API. You can use MATLAB analysis to trigger the REST call to Twillio (using webread or webwrite.) Then you can use the react app to schedule the code to run when the threshold is reached. Thanks for the valuble information. As i am a begginer i requested you that if possible please provided tutorials or indetail steps to complete the process that you have said previously. Thankyou <https://www.mathworks.com/help/thingspeak/analyze-channel-data-to-send-email.html Here's> a tutorial on how to send an email. You can google your cell provider to find the forwarding address. iot thingspeak
S. Muhammad Hossein Mousavi in File Exchange
上次活动时间: 2022-2-18

ThingSpeak Bee Hive IOT - Channel ID: 813426 https://thingspeak.com/channels/813426
Oguzhan Memis in MATLAB Answers
上次活动时间: 2022-2-17

Hi , I am trying to design a "website, which can run Matlab codes automatically " , to obtain processed IoT sensor data & graphs. I realized ThinkSpeak as a useful tool , but our custom design is needed for our system. When I made a quick surf on the internet & communities , I can not find exact same thing as embedding the matlab code, but integrating - visualizing matlab codes & outputs and graphs to the website. This is not the same thing as functions of ThinkSpeak. For "remote" acces, the API informations and automatic Matlab script outputs ( graphs etc. ) are need to be obtained, inside of the cloud-server. the ultimate question is : how to embed Matlab in a website, to run it automatically ? ( similar questions and answers are almost checked )
Christopher Stapels in Discussions
上次活动时间: 2022-1-18

My dear friend Ram and I have finished our latest movie series. You can watch the <https://www.mathworks.com/videos/iot-from-data-to-action-part-4-act-on-data-in-thingspeak-1639722099578.html final movie> , or see the <https://www.mathworks.com/videos/series/iot-from-data-to-action.html whole series>. In this movie we show how you can use TimeControls and Reacts to control devices or to schedule your MATLAB code that you can write in ThingSpeak. We also discuss a bit about channel sharing. New Movie: Act on Data in ThingSpeak. Fourth in IoT from Data to Action Thanks a lot for the movie. It turned out to be very helpful and instructive. Gratitude! move iot video environmental monitor air quality
Christopher Stapels in Discussions
上次活动时间: 2021-8-6

I recently found some interesting hardware in a <https://www.hackster.io/magicbit0/connect-your-magicbit-esp32-to-thingspeak-7b6b96 demo on Hackster>. The Magicbit is an ESP32-based project platform. It includes some plug and play sensors and a built-in display on a brightly colored PCB. The demo shows how to send the data collected by the Magicbit to ThingSpeak. You can see how to use the Arduino IDE to program the device, using the <https://github.com/mathworks/thingspeak-arduino ThingSpeak library for Arduino, ESP 8266, and ESP32> . Of course, once you get the data into ThingSpeak, you can use the integrated MATLAB to do just about anything with the data. The Magicbit is funded from a <https://www.kickstarter.com/projects/magicbit0/magicbit-create-your-first-iot-project-in-10-minutes?ref=4bmxsj Kickstarter campaign> . New IoT Hardware (Magicbit) that helps you get your data in ThingSpeak. hardware thingspeak iot iot hardware
Wen Yin Tay in MATLAB Answers
上次活动时间: 2021-7-16

I am developing the system that is monitoring the vehicle speed. I am using NI-XNET 8052 to get the signal from the vehicle with the help of Vehicle Network Toolbox. So far, I have identified the Standard CAN ID for the vehicle speed, as we can see from the picture below, the red box highlighted the vehicle speed. For now, I am not sure how to read the bit value only. If you happen to know the way, can you share it with me? Thanks.
Sundeep Goel in Discussions
上次活动时间: 2021-6-17

Hi, i was wondering if there is defined skill or some other way to display channel data on an amazon echo show device? Display channel data on echo show I did a quick search. Does this project help? <https://www.hackster.io/kayakpete/amazon-echo-alexa-thingspeak-data-checker-8677c0 Amazon Echo ThingSpeak Data Checker> Hi Hans, this one only reads out the data. Am looking for a UI applicaiton i.e. which display on the Show's screen based on voice command. Something like - "Alexa, show electricity graph" or Alexa, "show water level" - and you get graph / gauge displayed on your echo device. Hi Sandeep, Did you find a method to do this? echo show thingspeak alexa iot echo
salaheddine alshawwa in MATLAB Answers
上次活动时间: 2021-6-13

I am working on a home control system .i am using the thingSpeak server to control Nodemcu . The problem is that once i send the GET request to update a specific field it can take up to 12 seconds. And this is so slow. My question is , does this happen with other people before or am i doing something wrong.

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