Burcu Arslan in MATLAB Answers
Last activity on 9 Jun 2021

I have an Arduino project which collect sound data and send data to the ThingSpeak channel. I want to tweet with POSTMAN. When I click SEND button it works, however I have to create a regular tweeting function. For example, it should tweet the sound value every 2 hours. How can I do this, is there any KEY to complete this task?
N/A in MATLAB Answers
Last activity on 7 Jun 2021

I am using the standard program WriteSingleField from the Thingspeak library to send a number between 0 and 99 to one of he fields in my channel. Every 20 seconds the field is updated in the Arduino program. But after two updates I get an HTTP error -301 and the channel is stops updating... I tried several things (changing my write api key, using a longer delay, ) but cannot find a suolution. My Arduino MKR1000 uses the WiFi101 library and this is also the latest version 0.16.1. I have not changed anything in my WiFi router. Who knows a solution?
Adam in MATLAB Answers
Last activity on 19 May 2021

I modified the WriteMultipleFields example to include a MAX31855 which measures the board temp and a K-type thermocouple. I seem to be getting the "Problem updating channel. HTTP error code -401" in my seriel monitor however it seems to updating my channel properly. I copied and pasted my API so I dont think there is a typo, especially since it updates the channel. Any ideas on how to fix this? or can it be left alone since it still works? Also, can you change the timezone in the visualization from GMT to a different zone? I updated my profile but that didn't do it I am using an Arduino Nano 33 IoT
#define USE_ARDUINO_INTERRUPTS true #define DEBUG true #include "WiFiEsp.h" #include "secrets.h" #include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library. #include "ThingSpeak.h" // always include thingspeak header file after other header files and custom macros char ssid[] = SECRET_SSID; // your network SSID (name) char pass[] = SECRET_PASS; // your network password int keyIndex = 0; // your network key Index number (needed only for WEP) WiFiEspClient client; // Emulate Serial1 on pins 6/7 if not present #ifndef HAVE_HWSERIAL1 #include "SoftwareSerial.h" SoftwareSerial Serial1(10, 11); // RX, TX #define ESP_BAUDRATE 19200 #else #define ESP_BAUDRATE 115200 #endif unsigned long myChannelNumber = SECRET_CH_ID; const char * myWriteAPIKey = SECRET_WRITE_APIKEY; PulseSensorPlayground pulseSensor; const int PulseWire = A0; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0 const int LED13 = 13; // The on-board Arduino LED, close to PIN 13. int Threshold = 550; float myTemp; int myBPM; String BPM; String temp; int error; int panic; int raw_myTemp; float Voltage; float tempC; void setup() { Serial.begin(115200); //Initialize serial pulseSensor.analogInput(PulseWire); pulseSensor.blinkOnPulse(LED13); //blink Arduino's LED with heartbeat. pulseSensor.setThreshold(Threshold); // Double-check the "pulseSensor" object was created and "began" seeing a signal. if (pulseSensor.begin()) { Serial.println("!!!System Start!!!"); //This prints one time at Arduino power-up, or on Arduino reset. } while(!Serial){ ; // wait for serial port to connect. Needed for Leonardo native USB port only } // initialize serial for ESP module setEspBaudRate(ESP_BAUDRATE); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo native USB port only } Serial.print("Searching for ESP8266..."); // initialize ESP module WiFi.init(&Serial1); // check for the presence of the shield if (WiFi.status() == WL_NO_SHIELD) { Serial.println("WiFi shield not present"); // don't continue while (true); } Serial.println("found it!"); ThingSpeak.begin(client); // Initialize ThingSpeak } void loop() { // Connect or reconnect to WiFi if(WiFi.status() != WL_CONNECTED){ Serial.print("Attempting to connect to SSID: "); Serial.println(SECRET_SSID); while(WiFi.status() != WL_CONNECTED){ WiFi.begin(ssid, pass); // Connect to WPA/WPA2 network. Change this line if using open or WEP network Serial.print("."); delay(5000); } Serial.println("\nConnected."); } get_pulseSensor(); get_tempSensor(); delay(5000); // Wait 5 seconds to update the channel again } void get_pulseSensor(){ int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as an "int". // "myBPM" hold this BPM value now. if (pulseSensor.sawStartOfBeat()) { // Constantly test to see if "a beat happened". Serial.print("BPM: "); Serial.println(myBPM); // Print the value inside of myBPM. } else { Serial.println("BPM not detected"); } // Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up to 8 different // pieces of information in a channel. Here, we write to field 1. int x = ThingSpeak.writeField(myChannelNumber, 1, myBPM, myWriteAPIKey); if(x == 200){ Serial.println("Pulse Sensor update successful."); } else{ Serial.println("Problem updating Pulse Sensor. HTTP error code " + String(x)); } } void get_tempSensor(){ raw_myTemp = analogRead(A1); Voltage = (raw_myTemp / 1023.0) * 5000; // 5000 to get millivots. tempC = Voltage * 0.1; myTemp = tempC; String tempMessage = "Temperature: "; tempMessage += myTemp; tempMessage += "\" Celcius"; Serial.println(tempMessage); // Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up to 8 different // pieces of information in a channel. Here, we write to field 2. int x = ThingSpeak.writeField(myChannelNumber, 2, myTemp, myWriteAPIKey); if(x == 200){ Serial.println("Temperature Sensor update successful."); } else{ Serial.println("Problem updating Temperature Sensor. HTTP error code " + String(x)); } } // This function attempts to set the ESP8266 baudrate. Boards with additional hardware serial ports // can use 115200, otherwise software serial is limited to 19200. void setEspBaudRate(unsigned long baudrate){ long rates[6] = {115200,74880,57600,38400,19200,9600}; Serial.print("Setting ESP8266 baudrate to "); Serial.print(baudrate); Serial.println("..."); for(int i = 0; i < 6; i++){ Serial1.begin(rates[i]); delay(100); Serial1.print("AT+UART_DEF="); Serial1.print(baudrate); Serial1.print(",8,1,0,0\r\n"); delay(100); } Serial1.begin(baudrate); }
Niall in Discussions
Last activity on 14 Apr 2021

Hi - I'm currently using the code from this article: https://uk.mathworks.com/help/thingspeak/continuously-collect-data-and-bulk-update-a-thingspeak-channel-using-an-arduino-mkr1000-board-or-an-esp8266-board.html My plan was to use this so as to update my Thingspeak server every second with data recorded on my arduino of higher than 1Hz. I am currently taking vibration sensor data that for my project requires a higher sample rate than Thingspeak is able to handle naturally - thus I found bulk updates to be the solution. I have gotten this to work as specified in the article - updates every 2 minutes with data points at every 15 seconds. I have gotten this as far as data points every second with an update to the server every 10 second - however the system fails at any data point shorter than a second. I believe this to be a problem with using delta_t but I am not sure. To clarify I do not have a computer science background, this is currently a project I'm working on in Mechanical engineering and I've truly hit a wall with this problem. Any help would be appreciated! My system is an Arduino MEGA 2560 with an ethernet shield - in the sample code they use RSSI to output sample data, I simply changed this to a random number between 0-50. Using bulk-updates for larger sample rates As of April 2021, the time resolution of data stored in the ThingSpeak Channel is 1 second. If you're trying to upload raw data that is of higher resolution, you will have to pack the data into the field using some custom schema and the built in charts will not work. delta t cannot be shorter than a second at present. I recommend you use absolute times, but start them far in the past so you can keep them separated. You cannot have duplicate time stamps in the same channel so you want to make sure to avoid that. If you have a free field, you can use another field to encode the actual timestamp, or use some consistent transformation from the data point timestamp to the actual time you have for your device. For example, if you start your absolute timestamps in January 1 1900 12:00:00, then every one second could represent a tenth of a second in your system. Thank you for the reply! So in this case I would best use a Matlab visualization to take the JSON code after giving it a new time stamp? Thank you for the reply! Does this not conflict with the other comment that says channels do not allow smaller than 1 second time signatures? Regardless - I believe using your idea for a Matlab visualization may be the solution to my problem. You store the readings with a timestamp separated by one second. When you read them into the code for your visualization, you can divide the time difference by 10 to get the real time stamp. i.e. 1900-01-01 12:00:00 represents 2020-04-08 12:00:00:00 1900-01-01 12:00:01 is 2020-04-08 12:00:00:10 1900-01-01 12:00:02 is 2020-04-08 12:00:00:20 and so on. You will definitely need a custom visualization, as Vinod says. Perfect! Ill get to work looking at that now then. Thank you for your help! can I use a free field to encode the actual time stamp, or can I use some kind of sequential conversion from the data point time stamp to the actual time? Olivia,developer" <https://www.worktime.com employee monitoring software> " As long as you don't use duplicate timestamps and ensure they are separated by at least 1 second, that is a fine idea. The automatic field plots wont work, but you can make a custom MATLAB visualization to display the data. arduino bulk write bulk update json data
Claudio Buie in Discussions
Last activity on 22 Mar 2021

https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/introduction Hello, I try to do an aplication that warns me when is flood or when is a fire. I tryed to use ThingTweet to receive new status (better to send a message) when fire or flood happen. But not work that fine. Sometimes I receive a new status in my Tweeter account sometimes not. And this is the most annoying thing. To know that is working just some how. Digging for answers I didn't found much. But I saw Twitter changed the API version to: https://developer.twitter.com/en/docs/twitter-api/early-access. Please, I need some assistance to finish my project ! Thank you ThingTweet - new Twitter API v2: Early Access Here's something that may help you. Twitter blocks tweets that have similar text. So, if you tweet over an over "It's flooding..." Twitter may pass one of these tweets along, then stop the similar ones for a period of time. So, you need to change it up. I use a list of phrases that all have similar meaning but are worded differently. And, when I go to tweet, I select a random phrase and try to not to duplicate them too often. Onestly, I thought for one second that Twitter not allow same text. But I don't hnow if that come from Twitter or from ThingSpeak. Thank you for answer. It's ussefull! apps thingtweet twitter react esp32 esp8266 arduino
Alex Miranda in File Exchange
Last activity on 22 Mar 2021

Código Arduino para funcionamento da EMS Guamá
Christopher Stapels in Discussions
Last activity on 4 Mar 2021

I've been working with several collaborators on an indoor air quality monitoring project. You can see the post at <https://www.hackster.io/team-matlab-iot/make-your-air-safer-alerting-indoor-iot-air-quality-monitor-5eb90d Hackster> . It would be interesting to deploy many of these throughout a building to investigate interactions between different rooms and the flow of people. So far I've got two in my house. Let us know if you plan to make a few of them. Air Quality monitoring: perhaps a good project for schools returning from hybrid model air quality iot arduino matlab hardware
Jeff Jeff in MATLAB Answers
Last activity on 2 Dec 2020

I have tried various methods of uploading numeric data to ThingSpeak using a new DFRobot SIM7000E Arduino shield with no success. I have successfully proven that the shield will accept AT commands and interfaces with my local Telco network (Telstra - Australia). Every example code that I have used to date either falls over, or I do not understand the required setup variables. I am looking for some simple (commented) working code that relies on API and Channel No, as inputs. I have little experience with Iot and networks in general. Thank you Jeff
THEODOROS KOUKOUVES in MATLAB Answers
Last activity on 30 Nov 2020

Hello fellow programmers , I am trying to upload the findings of my max30100 sensor to thingspeak. While i have a working example who is not connected on thingspeak , when i try and connect it to thing speak i get 0 readings for both Bpm and Spo2 . My code is here and i believe it has to do something with me trying to pass a float value to thingspeak, /* Arduino-MAX30100 oximetry / heart rate integrated sensor library Copyright (C) 2016 OXullo Intersecans <x@brainrapers.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include <Wire.h> #include "ThingSpeak.h" #include "MAX30100_PulseOximeter.h" #include <WiFiNINA.h> /* wifi libaries to connect our device with BLYNK */ #include <BlynkSimpleWiFiNINA.h> /* libaries to connect our device with BLYNK */ #define BLYNK_PRINT Serial #define REPORTING_PERIOD_MS 1000 #define BLYNK_MAX_SENDBYTES 256 // Default is 128 // PulseOximeter is the higher level interface to the sensor // it offers: // * beat detection reporting // * heart rate calculation // * SpO2 (oxidation level) calculation PulseOximeter pox; BlynkTimer timer; WiFiClient client; float spo2 = pox.getSpO2(); unsigned long myChannelNumber = ; const char * myWriteAPIKey = ""; char auth[] = ""; // DONT STEAL THEM PLEASE // xD char ssid[] = ""; char pass[] = ""; uint32_t tsLastReport = 0; //simple and smart function to ignore first readings which are false and then check if Heart rate or Spo2 levels are abnormal , we ll call it outside of the loop because the IoT server gonna get overflooded with DATA , so we ll call with interval Time void sendMsg() { float h = pox.getHeartRate(); float o = pox.getSpO2(); if ( h >= 140) { Blynk.notify("Your BpM is Quite High,I am Sending Data To you Doctor "); } else if ( o<90 & o>80) { Blynk.notify("Your Spo2 is Quite Low,I am Sending Data To your Doctor "); } else if (h < 40) { Blynk.notify("Your BpM is Quite Low,I am Sending Data To you Doctor "); } else if (h==0 & o==0) { Blynk.notify("Place your finger to the sensor"); } } void wifi_connect(){ if(WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); while(WiFi.status() != WL_CONNECTED){ WiFi.begin(ssid, pass); // Connect to WPA/WPA2 network. Change this line if using open or WEP network Serial.print("."); delay(5000); } Serial.println("\nConnected."); } } // Callback (registered below) fired when a pulse is detected void onBeatDetected() { Serial.println("Beat!"); } void setup() { Serial.begin(115200); Blynk.begin(auth, ssid, pass); ThingSpeak.begin(client); //Initialize ThingSpeak Serial.print("Initializing pulse oximeter.."); // Initialize the PulseOximeter instance // Failures are generally due to an improper I2C wiring, missing power supply // or wrong target chip if (!pox.begin()) { Serial.println("FAILED"); for (;;); } else { Serial.println("SUCCESS"); } // The default current for the IR LED is 50mA and it could be changed // by uncommenting the following line. Check MAX30100_Registers.h for all the // available options. // pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA); // Register a callback for the beat detection pox.setOnBeatDetectedCallback(onBeatDetected); timer.setInterval(30000, sendMsg); //runs every half a min timer.setInterval(1000, wifi_connect); } void loop() { Blynk.run(); timer.run(); float x= ThingSpeak.writeField(myChannelNumber, 1, spo2, myWriteAPIKey); // Make sure to call update as fast as possible pox.update(); // Asynchronously dump heart rate and oxidation levels to the serial // For both, a value of 0 means "invalid" if (millis() - tsLastReport > REPORTING_PERIOD_MS) { Serial.print("Heart rate:"); Serial.print(pox.getHeartRate()); Serial.print("bpm / SpO2:"); Serial.print(pox.getSpO2()); Serial.println("%"); { // here what i did , is i am converting DIgital and ANALOG outputs to VIRTUAL so i can display them Blynk.virtualWrite(5, pox.getHeartRate()); Blynk.virtualWrite(4, pox.getSpO2()); } tsLastReport = millis(); } } It connects to Thingspeak , i just get 0 value for the spo2 ,but when i remove thingspeak code it works
OMAR AHMED in MATLAB Answers
Last activity on 18 Nov 2020

I have this code at the bottom and it always shows me a message that read data failed, what is the problem? "Tinker CAD simulator" // Tinkercad Arduino Tutorials: To Interface ESP8266+ThingSpeak+Arduino in Tinkercad Simulator String ssid = "Simulator Wifi"; // SSID to connect to WIFI String password = "Our virtual wifi has no password"; // String host = "https://api.thingspeak.com"; const int httpPort = 80; String uri = "/update?api_key=Q63ZZ2IFAYQ6I6HV"; String field1 = "field1"; String field2 = "field2"; int setupESP8266(void){ // Start our ESP8266 Serial Communication Serial.begin(115200); // Serial connection over USB to computer Serial.println("AT"); // Serial connection on Tx / Rx port to ESP8266 delay(10); // Wait a little for the ESP to respond if (!Serial.find("OK")) return 1; Serial.println("AT+CWJAP=\"" + ssid + "\",\"" + password + "\""); delay(10); // Wait a little for the ESP to respond if (!Serial.find("OK")) return 2; // Open TCP connection to the host: Serial.println("AT+CIPSTART=\"TCP\",\"" + host + "\"," + httpPort); delay(50); // Wait a little for the ESP to respond if (!Serial.find("OK")) return 3; return 0; } void sensors(void){ int tempSensor1 = map(analogRead(A0),20,350,-40,125); int gasSensor2 = map(analogRead(A1),10,350,0,100); // Construct our HTTP call String httpPacket= "GET "+ uri +"&"+field1 +"="+ String(tempSensor1)+"&"+ field2 +"="+String(gasSensor2)+ " HTTP/1.1\r\nHost: " + host + "\r\n\r\n"; int length = httpPacket.length(); Serial.println("tempSensorvalue: "+ String(tempSensor1)+"\n\n"); Serial.println("gasSensorvalue: "+ String(gasSensor2)+"\n\n"); Serial.print("AT+CIPSEND="); Serial.println(length); delay(10); // Wait a little for the ESP to respond if (!Serial.find(">")) return -1; // Send our http request Serial.print(httpPacket); delay(10); // Wait a little for the ESP to respond if (!Serial.find("SEND OK\r\n")) return; } void setup() { setupESP8266(); } void loop() { sensors(); delay(10000); }
Hitoshi.K in MATLAB Answers
Last activity on 10 Oct 2020

MATLAB, thingspeakについての質問です。 ※初めて質問します。不慣れなものですので情報が足らない場合は追加するようにいたします。 〖使用環境〗  MATLAB (R2020a) , ThingSpeak  arduino sketch(1.8.13 Windows Store)  ESP-WROOM-02 〖質問について〗 下記URLを参考に、thingspeak を用いESP8266からの温度データ※をMQTTプロトコルでpublishするプログラムをカスタマイズして作成しています。  * Arduino クライアントを使用したチャネルへのパブリッシュ  https://jp.mathworks.com/help/thingspeak/use-arduino-client-to-publish-to-a-channel.html  ※温度データは、サーモセンサーamg8833からのの温度情報。データは「,」区切りで8 x 8 の64個 上記状態でMATLABを起動し、thingspeakで受信されたデータを指定するコマンドをコンソールから打鍵して、 ESP8266からの温度データを変数として取り出せることを期待しているのですがMATLABにて格納される値がNaNとなってしまいます。 このような場合、どのような原因が考えられるでしょうか? また、MATLAB, thingspeak上での有効な 切り分け方法がありましたらご教示いただけないでしょうか? 〖補足情報〗 thingspeakに送信するメッセージをdebug する命令を追加したうえで arduino のsketch上でシリアルポートをモニタリングすると、下記のように表示されていますので、 コネクションの確立とメッセージの作成はできているものと考えています。 11:50:44.772 -> Attempting MQTT connection...Connected with Client ID: 8CceZMCY, Username: MQTTuser01 , Passwword: XXXXXXXXXXXXXXXX 11:50:45.351 -> channels/1076918/publish/XXXXXXXXXXXXXXXX 11:50:45.351 -> field3=27.00,29.25,28.25,24.75,25.50,26.00,26.25,27.00,26.75,30.50,26.75,25.75,25.00,26.00,26.25,27.00,28.00,30.00,28.25,26.75,26.00,25.75,26.50,26.50,28.25,28.00,28.25,27.75,26.50,26.00,26.25,27.00,28.50,28.25,28.25,29.50,28.25,27.50,28.25,27.75,29.25,29.75,29.00,28.50,28.75,30.25,30.25,31.00,29.75,29.75,29.50,30.50,30.75,30.75,31.25,31.25,29.75,29.75,30.00,30.00,29.25,31.00,30.50,30.75 11:51:42.868 -> Attempting MQTT connection...Connected with Client ID: nAigE7B8, Username: MQTTuser01 , Passwword: XXXXXXXXXXXXXXXX 11:51:43.388 -> channels/1076918/publish/XXXXXXXXXXXXXXXX 11:51:43.388 -> field3=27.50,29.50,26.50,25.25,25.75,25.75,26.50,27.25,27.00,29.75,26.50,25.50,24.75,26.00,25.50,26.75,28.75,29.75,28.00,26.75,25.75,26.25,26.75,26.00,28.25,28.00,28.25,28.00,26.50,26.25,26.00,27.00,28.50,29.25,28.50,29.50,28.25,28.75,28.25,26.75,29.50,30.00,29.50,28.50,28.75,31.00,30.75,30.75,30.50,29.00,29.75,30.50,30.75,31.00,31.75,30.75,29.75,28.50,29.50,30.00,29.50,29.75,30.50,31.25 11:52:40.321 -> Attempting MQTT connection...Connected with Client ID: PQYk6R6B, Username: MQTTuser01 , Passwword: XXXXXXXXXXXXXXXX 11:52:41.185 -> channels/1076918/publish/XXXXXXXXXXXXXXXX 11:52:41.185 -> field3=27.75,28.75,27.00,25.50,25.75,25.50,25.75,27.00,27.25,29.25,26.00,25.50,25.25,25.75,25.50,26.25,28.50,29.25,27.50,26.75,25.00,25.75,26.00,26.50,28.00,28.00,28.50,27.75,26.50,26.00,25.75,27.00,28.50,28.25,28.00,29.00,28.50,27.25,27.50,27.00,29.50,29.00,29.00,28.25,28.75,29.25,30.75,30.50,29.25,28.75,29.00,29.75,30.00,31.00,30.75,30.75,29.75,28.75,28.75,30.25,29.25,30.00,30.25,30.50 …(下略) しかしながら、冒頭記載させていただいた通り、上記状態でMATLABを起動し、下記のようなコマンドをコンソール上で打鍵して、 ESP8266からの温度データ(27.75,28.75,27.00,25.50,25.7~ ほか)を取り出せることを期待しているのですが MATLABのコンソール上でコマンド打鍵すると変数に格納される値がNaNとなってしまいます。 * コマンド >> readChannelID = XXXXXXX; >> readAPIKey = 'XXXXXXXXXXXXXXXX'; >> payload = thingSpeakRead(readChannelID,'Fields',[3],'NumPoints',3 ,'OutputFormat','timetable','ReadKey',readAPIKey); * コマンド実行結果 2020/10/05 11:50:47 NaN 2020/10/05 11:51:45 NaN 2020/10/05 11:52:42 NaN ※変数に格納される値がNaNとなってしまいっている。 一方、同一筐体のESP8266には別の温度センサーもあるので、そちらからのセンサーデータの取得をThingSpeakのコマンドI経由で 試みるとできています。 このように、同じ筐体、プログラム内で稼働させているセンサーからのデータが、thingspeak経由での変数取り出しが 出来ていることは確認できているので、基本的なシステム連携はできているものと考えています。 * コマンド >> readChannelID = XXXXXXX; >> readAPIKey = 'XXXXXXXXXXXXXXXX'; >> payload = thingSpeakRead(readChannelID,'Fields',[5],'NumPoints',3 ,'OutputFormat','timetable','ReadKey',readAPIKey); * コマンド実行結果 2020/10/05 12:09:01 25.8 2020/10/05 12:09:59 25.9 2020/10/05 12:19:56 25.8 ※こちらは値がNaNとはならずMATLABコンソールもから取得できている。 〖プログラム本体〗 ご参考にプログラム本体のmqtt publish部分を抜粋させていただきます。 --引用ここから void mqttpublish() { //read all the pixels amg.readPixels(pixels); // set AMG88 of array data String payload=""; for(int i = 0; i < AMG88xx_PIXEL_ARRAY_SIZE; i++){ payload += pixels[i]; if(i != 63){ payload += ","; } } // ThingSpeak に Publish するための文字列データを作成する String data = "field3=" + String(payload); int length = data.length(); char msgBuffer[length]; data.toCharArray(msgBuffer,length+1); // topic 文字列を作成し ThingSpeak の channel feed にデータを Publish する String topicString ="channels/" + String( myChannelNumber ) + "/publish/"+ String( myWriteAPIKey ); length=topicString.length(); char topicBuffer[length]; topicString.toCharArray(topicBuffer,length+1); Serial.println(topicBuffer); Serial.println(msgBuffer); // debug 用 mqttClient.publish( topicBuffer, msgBuffer ); lastConnectionTime = millis(); // 最後に Publish した時間からのカウント } --引用ここまで
THEODOROS KOUKOUVES in MATLAB Answers
Last activity on 8 Oct 2020

Hello , as the title says i managed to pull data from a sensor attached to my arduino , then i send this data via BLE to my mobile app and from my mobile app i succesffuly upload them to my channel. Problem: Sensor data are integers and they automatically translated to Hex in the ble gatt server , so i am receivng hex Values ( i guess) ,i save these hex values into a list with strings in my mobile app and then i upload this list to thingspeak . My readings are ALL 0 , any idea whats wrong ?
Aman Kumar in MATLAB Answers
Last activity on 22 May 2020

Here is the code, i only want email notification once a month. How can i schedule notification for the same. % Enter your MATLAB Code below % Read Output Water Quantity over the past month from a ThingSpeak channel and write % the average to another ThingSpeak channel. % Channel 1035265 contains data from the MathWorks water supply station, located % in Natick, Massachusetts. The data is collected once every day. Field % 3 contains output liquid quantity data. % Channel ID to read data from readChannelID = 1035265; % Output Liquid Quantity Field ID outputliquidqantityFieldID = 3; % Channel Read API Key % If your channel is private, then enter the read API Key between the '' below: readAPIKey = ''; % Get Output Liquid Quantity data for the last 30 days from the MathWorks water supply % station channel. Learn more about the THINGSPEAKREAD function by going to % the Documentation tab on the right side pane of this page. meter_reading = thingSpeakRead(readChannelID,'Fields', outputliquidqantityFieldID,'NumPoints',1,'ReadKey',readAPIKey); % Calculate the Cost Billing_cost = 5* (meter_reading/1000); display(Billing_cost,'Total Billing Cost (INR)'); % Start by setting the channel ID and Alert key. All alert key start with TAK. data = thingSpeakRead(1035265,"NumDays", 30); formatSpec = "The Water consumption bill is: %d,%d"; A1 = 5* (meter_reading/1000); A2 = meter_reading apiKey = 'TAK14ZOZGAXZQMR05'; alertURL = "https://api.thingspeak.com/alerts/send"; options = weboptions("HeaderFields", ["ThingSpeak-Alerts-API-Key", apiKey ]); alertBody = sprintf(formatSpec,A1,A2) alertSubject = sprintf(" Water consumption exceeded 100 kl!"); if meter_reading >= 100 webwrite(alertURL, "body", alertBody, "subject", alertSubject, options); end
AMMAS in MATLAB Answers
Last activity on 5 Apr 2020

Hey guys, I have been researching and I am trying to build a function that posts the output of a sensor to thingspeak on the Arduino Yun. Here is my code so far, but I am getting no success, unfortunately. After looking up on the internet, everywhere I can, this is what I came up with. void postToThingSpeak(int value) { Process p; String cmd = "curl -d 'key=XXXXXXXXXXXXXXXXX&field1="; cmd = cmd + value; cmd = cmd + "' -k http://api.thingspeak.com/update"; p.runShellCommand(cmd); Serial.println(cmd); // do nothing until the process finishes, so you get the whole output: while(p.running()); } PS: I took the cmd after it was printed, and ran it in terminal and it worked perfectly. For some reason it's not working on the Arduino Yun though. Any assistance would be appreciated, thank you very much!
Pavel Plotinnov in MATLAB Answers
Last activity on 19 Feb 2020

Hi, I try to control some relays thr TalkBack app. Using ESP 8266. Everything connecting to Internet. I got stuck on how to activate relay. I used Key, used ID. I cant find how to send command thru TalkBack I dont know what Command ID for, and how to send command string. Need some help please Also here is my code and some screenshots: #include "ThingSpeak.h" #include "ESP8266WiFi.h" const char ssid[] = "XXX"; // your network SSID (name) const char pass[] = "YYY"; // your network password #define RELAY1 12 #define RELAY2 13 #define RELAY3 14 #define RELAY4 16 WiFiClient client; //---------Channel Details---------// unsigned long counterChannelNumber = 123; // Channel ID const char * myCounterReadAPIKey = "ZZZ"; // Read API Key const int FieldNumber1 = 1; // The field you wish to read const int FieldNumber2 = 2; // The field you wish to read const int FieldNumber3 = 3; // The field you wish to read const int FieldNumber4 = 4; // The field you wish to read //-------------------------------// void setup() { Serial.begin(115200); WiFi.mode(WIFI_STA); ThingSpeak.begin(client); } void loop() { //----------------- Network -----------------// if (WiFi.status() != WL_CONNECTED) { Serial.print("Connecting to "); Serial.print(ssid); Serial.println(" ...."); while (WiFi.status() != WL_CONNECTED) { WiFi.begin(ssid, pass); delay(5000); } Serial.println("Connected to Wi-Fi Succesfully."); } //--------- End of Network connection--------// //---------------- Channel 1 ----------------// Serial.print("Reading field 1 "); long R_Status = ThingSpeak.readLongField(counterChannelNumber, FieldNumber1, myCounterReadAPIKey); int statusCode = ThingSpeak.getLastReadStatus(); if (statusCode == 200) { Serial.print("Read field 1 Successful "); // Serial.println(temp); } else { Serial.println("Unable to read channel / No internet connection"); } Serial.println(R_Status); if(R_Status==1) { digitalWrite(RELAY1, HIGH); //Relay 1 ON Serial.println("Relay 1 ON"); } if(R_Status==2) { digitalWrite(RELAY1, LOW); //Relay 1 OFF Serial.println("Relay 1 OFF"); } Serial.print("Reading field 2 "); delay(5000); long R_Status2 = ThingSpeak.readLongField(counterChannelNumber, FieldNumber2, myCounterReadAPIKey); int statusCode2 = ThingSpeak.getLastReadStatus(); if (statusCode2 == 200) { Serial.print("Read field 2 Successful "); // Serial.println(temp); } else { Serial.println("Unable to read channel / No internet connection"); } Serial.println(R_Status2); if(R_Status2==1) { digitalWrite(RELAY2, HIGH); //Relay 2 ON Serial.println("Relay 1 ON"); } if(R_Status2==2) { digitalWrite(RELAY2, LOW); //Relay 2 OFF Serial.println("Relay 1 OFF"); } Serial.print("Reading field 3 "); delay(5000); long R_Status3 = ThingSpeak.readLongField(counterChannelNumber, FieldNumber3, myCounterReadAPIKey); int statusCode3 = ThingSpeak.getLastReadStatus(); if (statusCode3 == 200) { Serial.print("Read field 3 Successful "); // Serial.println(temp); } else { Serial.println("Unable to read channel / No internet connection"); } Serial.println(R_Status3); if(R_Status3==1) { digitalWrite(RELAY3, HIGH); //Relay 3 ON Serial.println("Relay 3 ON"); } if(R_Status3==2) { digitalWrite(RELAY3, LOW); //Relay 3 OFF Serial.println("Relay 3 OFF"); } Serial.print("Reading field 4 "); delay(5000); long R_Status4 = ThingSpeak.readLongField(counterChannelNumber, FieldNumber4, myCounterReadAPIKey); int statusCode4 = ThingSpeak.getLastReadStatus(); if (statusCode4 == 200) { Serial.print("Read field 4 Successful "); // Serial.println(temp); } else { Serial.println("Unable to read channel / No internet connection"); } Serial.println(R_Status4); if(R_Status4==1) { digitalWrite(RELAY4, HIGH); //Relay 4 ON Serial.println("Relay 4 ON"); } if(R_Status4==2) { digitalWrite(RELAY4, LOW); //Relay 4 OFF Serial.println("Relay 4 OFF"); } delay(10000); // ThingSpeak will only accept updates every 10 seconds. }
Sai Pavan Nunna in MATLAB Answers
Last activity on 8 Feb 2020

Can anyone share with the code on how to plot ECG sensor data into ECG graph using Matlab visualization in Thingspeak. I am able to do using Processing IDE.I want to do the same in Thingspeak. Teh processing code is https://github.com/sparkfun/AD8232_Heart_Rate_Monitor. I want the equivalent matlab code. I am not able to get the equivalent. Please someone help me.
Benjamin Cortez in MATLAB Answers
Last activity on 28 Jan 2020

I explain, under an alternative internet, I can send information without any problem from the Arduino to ThingSpeak, but when I connect to the network of my work (Ministry of Housing and Urbanization of Chile), it fails to send the applications, or I think it sends them but it is not able to receive answers .. In some occasions it does not solve the DNS, or in others, it resolves them, but it throws error 401 Unauthorized. So, I need to know what exactly the problem is, in order to send a ticket to those who are responsible for modifying the network here. To be more exact, I use an ENC28J60 module I would appreciate any help, if more information is missing just ask me, thank you and have a good day.
Emilio Rubio Garcia in MATLAB Answers
Last activity on 21 Jan 2020

Dear Mr.: I've got problem for uploading data to my channe. I am not been able to post (via Get sentence) in my channel (949075) for trials, although I'm getting the right answer from your server. I can see that data is not uploading because it is not appearing in downloaded files. I have been able to post (same Get way) but I had to change Arduino sketch because it was not stable. Is now that it is stable, because I am getting the right sequence of messages from your server. It took a lot of time and trials before I have been able to upload data. Could you, please, help me for solving issue? Please, let me know if I should do anything by my side. Thank you very much in advance. Emilio Rubio.
Ferdib-Al-Islam Ferdib in MATLAB Answers
Last activity on 18 Nov 2019

#include "ThingSpeak.h" #include <ESP8266WiFi.h> char ssid[] = "F"; // your network SSID (name) char pass[] = "qwerty"; // your network password int keyIndex = 0; // your network key Index number (needed only for WEP) WiFiClient client; unsigned long myChannelNumber = 919998; //SECRET_CH_ID; const char * myWriteAPIKey = "1D95P000GF21W88Z"; // SECRET_WRITE_APIKEY; int value1 = 0, value2 = 0, value3 = 0, value4 = 0; void setup() { Serial.begin(9600); WiFi.mode(WIFI_STA); ThingSpeak.begin(client); // Initialize ThingSpeak while (!Serial) { ; } } void loop() { // Connect or reconnect to WiFi if (WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(SECRET_SSID); while (WiFi.status() != WL_CONNECTED) { WiFi.begin(ssid, pass); Serial.print("."); delay(5000); } Serial.println("\nConnected."); } while (!Serial.available()); String incommingStr = Serial.readStringUntil('\n'); Serial.println(incommingStr); // splitting incomingStr int data1 = incommingStr.indexOf(','); //finds location of first , int value1 = incommingStr.substring(0, data1).toInt(); //captures first data String int data2 = incommingStr.indexOf(',', data1 + 1 ); //finds location of second , int value2 = incommingStr.substring(data1 + 1, data2 + 1).toInt(); //captures second data String int data3 = incommingStr.indexOf(',', data2 + 1 ); int value3 = incommingStr.substring(data2 + 1, data3 + 1).toInt(); int data4 = incommingStr.indexOf(',', data3 + 1 ); int value4 = incommingStr.substring(data3 + 1).toInt(); //captures remain part of data after last , // set the fields with the values ThingSpeak.setField(1, value1); ThingSpeak.setField(2, value2); ThingSpeak.setField(3, value3); ThingSpeak.setField(4, value4); Serial.println(String(value1) + " " + String(value2) + " " + String(value3) + " " + String(value4)); // set the status ThingSpeak.setStatus("4 fields added."); // write to the ThingSpeak channel int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); if (x == 200) { Serial.println("Channel update successful."); } else { Serial.println("Problem updating channel. HTTP error code " + String(x)); } delay(20000); }
joem in MATLAB Answers
Last activity on 21 Oct 2019

I build an arduino based device and connect a GSM900 module to it which can establish GPRS connection and visit website. Also I have created an account in thingspeak. I tested sending data to the field with the browser in my PC by visiting https://api.thingspeak.com/update?api_key=XXXXXXXXXXXXX&field1=0, and it does upload data and shows a number. But when I try to do the same thing with the arduino based device, after softSerial.println("GET https://api.thingspeak.com/update?api_key=XXXXXXXXXXXXX&field1=0"); It dosn't repond nor shows the number. Is there anything missing? The following is the arduino sketch and all the at command before the line above shows "ok" result. Also, is there a way to test this GSM900 module is able to get http? #include <SoftwareSerial.h> SoftwareSerial softSerial(51, 52);// void setup() { Serial.begin(9600); softSerial.begin(9600); Serial.println("Initing...please wait."); softSerial.println("AT+CPIN?"); delay(500); printLine(); softSerial.println("AT+CGATT?"); delay(500); printLine(); softSerial.println("AT+CIPSHUT"); delay(500); printLine(); softSerial.println("AT+CIPSTATUS"); delay(500); printLine(); softSerial.println("AT+CIPMUX=0"); delay(500); printLine(); softSerial.println("AT+CSTT=\"ZENNET\""); delay(500); printLine(); softSerial.println("AT+CIICR"); delay(3000); printLine(); softSerial.println("AT+CIFSR"); delay(1000); printLine(); //softSerial.println("AT+CIPSPRT=0"); // delay(1000); // printLine(); softSerial.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\""); //AT+CIPSTART="TCP","api.thingspeak.com","80" delay(3000); printLine(); softSerial.println("AT+CIPSEND"); delay(13000); printLine(); softSerial.println("GET https://api.thingspeak.com/update?api_key=XXXXXXXXXXXXX&field1=0"); delay(20000); printLine(); softSerial.println("\#026"); delay(3000); printLine(); softSerial.println("AT+CIPSHUT"); delay(500); printLine(); } void loop() { } void printLine() { String data; while (softSerial.available() > 0) { char c = softSerial.read(); data += c; } Serial.println(data); }
hussam alkdary in MATLAB Answers
Last activity on 16 Oct 2019

Hi i'm Beginner in thingspeake i create a new channel and i don't knew how to connect my esp 8266 to this cloud in other word what i should add to this code to make it upload the data to the cloud /* ESP8266 Blink by Simon Peter Blink the blue LED on the ESP-01 module This example code is in the public domain The blue LED on the ESP-01 module is connected to GPIO1 (which is also the TXD pin; so we cannot use Serial.print() at the same time) Note that this sketch uses LED_BUILTIN to find the pin with the internal LED */ void setup() { pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level // but actually the LED is on; this is because // it is active low on the ESP-01) delay(1000); // Wait for a second digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH delay(2000); // Wait for two seconds (to demonstrate the active low LED) }
James Holland in MATLAB Answers
Last activity on 11 Oct 2019

Greetings! My project is to read in data from two arduinos and then separate the data into four matrices. These matrices are comprised of 8 values and are sent to ThingSpeak when filled (to 8). My issue is that I am attempting to send 4 matrices to ThingSpeak via this line : thingSpeakWrite('ChID',{heartRateInputA,temperatureInputA,heartRateInputB,temperatureInputB},'WriteKey','myWriteKey'); When I execute this, the data goes through but only the first column of the 1-D array. How do I send the whole array? Attached below is the rest of my code. %Uses two sets of nested 'if' loops and variables and ThingSpeak channels %to read in and parse data from each controller a = Bluetooth('HC-05',1); b = Bluetooth('IN',1); a.ReadAsyncMode = 'continuous'; b.ReadAsyncMode = 'continuous'; fopen(a); %data collector A fopen(b); %data collector B %A data points heartRateVarA=0; temperatureVarA=0; %B data points heartRateVarB=0; temperatureVarB=0; col = 1; %column counter for matrices heartRateInputA = []; temperatureInputA = []; heartRateInputB = []; temperatureInputB = []; while (a.Status == 'open')&(b.Status=='open') %if data has been sent to thingSpeak, reset the column counter if(col == 15) col=0; end col = col+1; for i=1 : 1 : 2 matchA = fgets(a); matchB = fgets(b); testA = contains(matchA,'Celsius'); testB = contains(matchB,'Celsius'); %Test A parsing if (testA==1) temperatureVarA=matchA; else testA=contains(matchA,'BPM'); if(testA==1) heartRateVarA=matchA; end end %Test B parsing if (testB==1) temperatureVarB=matchB; else testB=contains(matchB,'BPM'); if(testB==1) heartRateVarB=matchB; end end end %Display read and parsed in data fprintf('Device 1 : \n\n');disp(col); fprintf('Heart Rate A : '); disp(heartRateVarA); fprintf('Temperature A : '); disp(temperatureVarA); fprintf('Device 2 : \n\n'); fprintf('Heart Rate B : '); disp(heartRateVarB); fprintf('Temperature B : '); disp(temperatureVarB); %Removes non-numeric characters from data and sends to respective %matrix hInputA = str2double(strrep(heartRateVarA,'BPM: ','')); tInputA = str2double(strrep(temperatureVarA,'Celsius: ','')); hInputB = str2double(strrep(heartRateVarA,'BPM: ','')); tInputB = str2double(strrep(temperatureVarB,'Celsius: ','')); heartRateInputA(1,col) = hInputA; temperatureInputA(1,col) = tInputA; heartRateInputB(1,col) = hInputB; temperatureInputB(1,col) = tInputB; %create arbitrary time stamps of same size as data points to send data to %thingspeak stamps = [datetime('now')-minutes(length(matchA)-1):minutes(1):datetime('now')]'; pause(2); %pauses for 2 seconds to coincide with arduinos if(col==8) col=1; thingSpeakWrite(501358,{heartRateInputA,temperatureInputA,heartRateInputB,temperatureInputB},'WriteKey','JLS6DXUINWFGI6QD'); end end Thanks in advanced.
John Park in MATLAB Answers
Last activity on 24 Apr 2019

I am trying to write humidity and temperature data from DHT22 to thingspeak channel. I installed Arduino support package and additional library for DHT (FYI: I haven't set myself any directory when I install the package & library) Then I get the error message as below: C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++ -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -g -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MF"MW_thingspeak.dep" -MT"MW_thingspeak.o" -MMD -mcpu=cortex-m0plus -fpermissive -DF_CPU=48000000L -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x824e -DUSBCON -DUSB_MANUFACTURER=\""Unknown\"" -DUSB_PRODUCT=\""Genuino MKR1000\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MKR1000_ -D_RTT_THINGSPEAK_WIFI_=1 -D_RTT_USE_SERIAL0_ -DMODEL=dht22_iot_demo -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DON_TARGET_WAIT_FOR_START=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DEXT_MODE=1 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DXCP_CUSTOM_PLATFORM -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DMW_TIMERID=9 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=46875 -DMW_SCHEDULERCOUNTER=2 -D_RTT_BAUDRATE_SERIAL0_=9600 -D_RTT_BAUDRATE_SERIAL1_=9600 -D_RTT_ANALOG_REF_=0 -D_RTT_WIFI_Local_IP1=192 -D_RTT_WIFI_Local_IP2=168 -D_RTT_WIFI_Local_IP3=1 -D_RTT_WIFI_Local_IP4=20 -D_RTT_WIFI_SSID="Park1Suite0404" -D_RTT_WIFI_WPA_PASSWORD=jj12190516P -D_RTT_WIFI_WPA=1 -D_RTT_DISABLE_Wifi_DHCP_=0 -D_RTT_ThingSpeak_IP1=184 -D_RTT_ThingSpeak_IP2=106 -D_RTT_ThingSpeak_IP3=153 -D_RTT_ThingSpeak_IP4=149 -D_RTT_ThingSpeak_Port=80 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DEXT_MODE=1 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DXCP_CUSTOM_PLATFORM -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=dht22_iot_demo -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -IC:/Users/JOHNPA~1/DOCUME~1/MATLAB/DHT_v2 -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinobase/include -IC:/Users/JOHNPA~1/AppData/Roaming/MATHWO~1/MATLAB Add-Ons/Collections/Arduino Additional Sensors Library (DHT, LPS331)/roslovets-Arduino_Additional_Sensors_Simulink_Library_DHT_LPS331-7d4fe21/drivers/DHT/include -IC:/Users/JOHNPA~1/DOCUME~1/MATLAB/DHT_v2/dht22_iot_demo_ert_rtw -IC:/PROGRA~1/MATLAB/R2019a/extern/include -IC:/PROGRA~1/MATLAB/R2019a/simulink/include -IC:/PROGRA~1/MATLAB/R2019a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2019a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2019a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2019a/toolbox/coder/rtiostream/src -IC:/PROGRA~1/MATLAB/R2019a/toolbox/coder/rtiostream/src/utils -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.6.20/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.6.20/variants/mkr1000 -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinotarget/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinotarget/scheduler/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/armcortexmbase/scheduler/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/shared/externalmode_daemon/include -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/bsp/include -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/bus_wrapper/include -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/common/include -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/driver/include -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/driver/source -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/socket/include -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/socket/source -IC:/Users/JOHNPA~1/DOCUME~1/Arduino/libraries/WiFi101/src/spi_flash/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.6.20/libraries/SPI -o MW_thingspeak.o C:/ProgramData/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinobase/src/MW_thingspeak.cpp arm-none-eabi-g++: error: Add-Ons/Collections/Arduino: No such file or directory arm-none-eabi-g++: error: Additional: No such file or directory arm-none-eabi-g++: error: Sensors: No such file or directory arm-none-eabi-g++: error: Library: No such file or directory arm-none-eabi-g++: error: (DHT,: No such file or directory arm-none-eabi-g++: error: LPS331)/roslovets-Arduino_Additional_Sensors_Simulink_Library_DHT_LPS331-7d4fe21/drivers/DHT/include: No such file or directory gmake: *** [MW_thingspeak.o] Error 1 The make command returned an error of 2 ### Build procedure for model: 'dht22_iot_demo' aborted due to an error. Error(s) encountered while building "dht22_iot_demo": ### Failed to generate all binary outputs. Please advise how to resolve it.

About 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.

Top Contributors