Results for
I found I have to use VPN to access my thingspeak data channels from China. Is this a known problem? if yes, anything I can do to solve the problem?
MATLAB (& Mathworks toolboxes) only
50%
Simulink only
2%
Both MATLAB & Simulink
22%
MATLAB & third party toolboxes
6%
Simulink & third party toolboxes
1%
Both ML & SL & 3rd party toolboxes
19%
1043 votes
Yes, if they have what I want.
41%
No, probably not.
59%
1437 votes
T-shirt
33%
Cap/hat
11%
Backpack, bag, satchel
19%
Logo sticker
14%
Mouse pad
12%
Other (tool, toy, Rubik's, etc.)
12%
1592 votes
We welcome Brian Buechel and Nikola Trica as this week's guests. They will analyze experimental data to quantify the ride quality of a car suspension in MATLAB. They'll work with signals recorded from a car suspension, analyze the data, and visualize the results. At the end, we'll have a shareable report containing code and formatted text that clearly communicates our findings.

Watch the event live or the recording on YouTube. We welcome your questions during the event and let us know what other topics that you are interested in seeing.
I am trying to write a table to a TS channel using thingSpeakWrite. The code below results in error but the help documentation indicates that it can be done. Any suggestion on how to fix this?
Function to call:
thingSpeakWrite(channelID,ship1(1,:),'WriteKey',writeAPIKey);
The complete code:
%Initialize table to be written to ThingSpeak
varNames = ["MMSI", "LAT", "LONG", "SOG", "VesselName", "VesselType", "Length", "Width"];
varTypes = ["double", "double", "double", "double", "categorical", "double", "double", "double"];
ship1 = table('Size',[20 8],'VariableTypes',varTypes,'VariableNames',varNames);
ship1.MMSI(:) = 121212;
ship1.SOG(:) = 10;
ship1(:,5) = {'PRIMODY'};
ship1(:,6) = {37};
ship1.Length(:) = 20;
ship1.Width(:) = 12;
thingSpeakWrite(channelID,ship1(1,:),'WriteKey',writeAPIKey);
More advertising or sympos. exhibit
3%
More media mentions (news segments)
3%
Adjust pricing
59%
Sponsor research & publications
11%
Boost university involvement
21%
Something else (list in comments)
4%
1076 votes
Hello everyone, I need some help, I am developing a POC for a TCC using the DEMO itself "Example of HTTPS GET with SoftwareSerial and Arduino-SIM800L-driver" and when sending the data I am receiving a 606 error, does anyone have any idea of what it might be and how to solve it, I've validated the string sends through POSTMAN and it's ok.
SIM800L : Receive "AT+HTTPPARA="URL","https://api.thingspeak.com/update?api_key=XXXXXXXXXXXXXXX&field1=-23.5204435&field2=-46.5078319&field3=10&field4=600"
OK
"
SIM800L : Send "AT+HTTPPARA="REDIR",1"
SIM800L : End of transmission
SIM800L : Receive "AT+HTTPPARA="REDIR",1
OK
"
SIM800L : Send "ATI"
SIM800L : End of transmission
SIM800L : Receive "ATI
SIM800 R14.18
"
SIM800L : initiateHTTP() - Support of SSL enabled
SIM800L : Send "AT+HTTPSSL=1"
SIM800L : End of transmission
SIM800L : Receive "AT+HTTPSSL=1
OK
"
SIM800L : Send "AT+HTTPACTION=0"
SIM800L : End of transmission
SIM800L : Receive "AT+HTTPACTION=0
OK
"
SIM800L : End of transmission
SIM800L : Receive "
+HTTPACTION: 0,606,0
"
SIM800L : readHTTP() - HTTP status 606
SIM800L : Send "AT+HTTPTERM"
SIM800L : End of transmission
SIM800L : Receive "AT+HTTPTERM
OK
All my mqtt python thingspeak publish programs are stop sending values to thingspeak cloud today. is that issue with thingspeak cloud or any other issue.
/*
* Use software serial for the PZEM
* Pin gpio2 Rx (Connects to the Tx pin on the PZEM)
* Pin gpio0 Tx (Connects to the Rx pin on the PZEM)
*/
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <PZEM004Tv30.h>
#include "credentials.h" //this file keeps some private settings
WiFiClient wificlient;
WiFiClient glient; //Google client
//PZEM004Tv30 pzem(11, 12); //original config
PZEM004Tv30 pzem(4, 5); //Rx,Tx,(D2,D1) on nodeMCU
//PZEM004Tv30 pzem(13, 15); //Rx,Tx,(D7,D8) another config
//PZEM004Tv30 pzem(2, 0); //Rx,Tx,(gpio2,gpio0) on ESP-01
String tsStatus; //ThingSpeak, 255 char, null terminated
String status;
int error = 0; //0 no error; 1,2,4,8,16,32 -> errors for each parameter
float voltage, current, power, energy, frequency, pf;
float Vmax = 120.0;
float Vmin = 120.0;
float Pmax = 0.0;
int readAvg = 29; //nr of measurements averaged and sent to TS
int hour, minute, second, day, month, year;
//==============================================================================
// Functions
//==============================================================================
void wifiConnect(int n)
// "n" is the max number of tries to connect to SSID. If "n" reaches zero then
// wait for 15min and tries again for k (=100) cycles (100 * 15min ~ 25 hours)
{
WiFi.disconnect();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid,password);
int nn = n;
int k = 100; // [_] to put this at the beginning
while (k > 0)
{
while ((WiFi.status() != WL_CONNECTED) && (n > 0))
{
delay(1000);
Serial.print(n);Serial.print(" >");
//Serial.print(F(":"));
n--;
}//while
//either connected or n = 0
//if connected -> break
if (WiFi.status() == WL_CONNECTED)
{
Serial.print(F("\nWiFi connected to IP address: ")); //@
Serial.println(WiFi.localIP()); //@
break;//exit from outward while
//return;
}
if (n == 0) //not connected to wifi during n*1000ms
{
n = nn; //start over with initial n
k--;
if (k != 0)
{
delay(300000); // 5 min
}
else //-> k == 0
{
Serial.println(F("Restart"));
delay(50);//to allow the serial to finish
ESP.restart();
}
}
}//while
return;//this point is reached only from the above 'break'
}
String getTime()
{
//in the main prog is defined the client to access google as "glient"
Serial.println(F("connecting to google"));//@
//Serial.println(google); //@
if (!glient.connect(ghost, httpPort))
{
Serial.println(F("connection failed"));
return "google_fail";
}
// This will send the request to the server
glient.println("HEAD / HTTP/1.1");
glient.println("Host: www.google.com"); // "Host: www.google.com"
glient.println("Accept: */*");
glient.println("User-Agent: Mozilla/4.0 (compatible; esp8266 Arduino;)");
glient.println("Connection: close");
glient.println();
delay(500);
// Read all the characters of the reply from server and print them to Serial
String reply = String("");
while(glient.available())
{
char c = glient.read();
reply = reply + String(c);
}
//Serial.print(reply); //@
String d = reply.substring(reply.indexOf("Date: ")+11,reply.indexOf("Date: ")+23);
String t = reply.substring(reply.indexOf("Date: ")+23,reply.indexOf("Date: ")+35);
hour = t.substring(0, 2).toInt();
minute = t.substring(3, 5).toInt();
second = t.substring(6, 8).toInt();
day = d.substring(0, 2).toInt();
month = d.substring(3, 5).toInt();
year = d.substring(6, 8).toInt();
hour = hour + 16;//for summer is 16, for winter is 15
if (hour >= 24)
{
hour = hour % 24; //This is GMT - 4 -> Mtl hour
}
if(!glient.connected())
{
//Serial.println("disconnecting");
glient.stop();
}
Serial.println("connection closed"); //@
return t;
}
void setup()
{
Serial.begin(115200);
tsStatus = String("");
Serial.println(F("\nFilename: PZEM_SoftSerial.ino/30jun2020 "));
//WiFi.persistent(false);
//Wifi.persistent(false) is used for deep-sleep, to keep wifi param in ram
wifiConnect(60); //try for 60 seconds
glient.setTimeout(5000);
getTime();
}
void loop()
{
/*
the time is got first in setup(). The loop is parsed each two seconds so
I need a counter variable (or a time variable) to check the local time (millis)
to know when to ask again google for date&time.
I need also a procedure to sync on zero seconds.
The data is sent each minute.
*/
if ((WiFi.status() != WL_CONNECTED))
{
wifiConnect(60);
}
float Voltage = 0.0, Current = 0.0, Power = 0.0, Energy = 0.0, Frequency = 0.0, PF = 0.0;
for (int i = 0; i < readAvg; i++)
{
error = 0;
voltage = pzem.voltage();
if( !isnan(voltage) )
{
Serial.print("Voltage: "); Serial.print(voltage); Serial.println("V");
Voltage += voltage;
//check for Max and Min values
if (voltage > Vmax)
{
Vmax = voltage;
}
if (voltage < Vmin)
{
Vmin = voltage;
}
//send Vmax and Vmin as tsStatus
Serial.print("\tVmax = ");Serial.print(Vmax);Serial.println("V");
Serial.print("\tVmin = ");Serial.print(Vmin);Serial.println("V");
}
else
{
Serial.println(F("Error reading voltage"));
error = error + 1;
}
current = pzem.current();
if( !isnan(current) )
{
Serial.print("Current: "); Serial.print(current); Serial.println("A");
Current += current;
}
else
{
Serial.println(F("Error reading current"));
error = error + 2;
}
power = pzem.power();
if( !isnan(power) )
{
Serial.print("Power: "); Serial.print(power); Serial.println("W");
Power += power;
//check for Max value
if (power > Pmax)
{
Pmax = power;
}//--> to send Pmax as tsStatus
Serial.print("\tPmax = ");Serial.print(Pmax);Serial.println("W");
}
else
{
Serial.println(F("Error reading power"));
error = error + 4;
}
energy = pzem.energy();
if( !isnan(energy) )
{
Serial.print("Energy: "); Serial.print(energy,3); Serial.println("kWh");
Energy += energy;
}
else
{
Serial.println(F("Error reading energy"));
error = error + 8;
}
frequency = pzem.frequency();
if( !isnan(frequency) )
{
Serial.print("Frequency: "); Serial.print(frequency, 1); Serial.println("Hz");
Frequency += frequency;
}
else
{
Serial.println(F("Error reading frequency"));
error = error + 16;
}
pf = pzem.pf();
if( !isnan(pf) )
{
Serial.print("PF: "); Serial.println(pf);
PF += pf;
}
else
{
Serial.println(F("Error reading power factor"));
error = error + 32;
}
Serial.println();
if (error > 0)
{
Serial.print("--> Error: "); Serial.println(error);Serial.println();
}
delay(1950);
}//for
voltage = Voltage / readAvg;
current = Current / readAvg;
power = Power / readAvg;
energy = Energy / readAvg;
frequency = Frequency / readAvg;
pf = PF / readAvg;
status = "Error = " + String(error) + " / Pmax = " + String(Pmax) + " / Vmax = " + String(Vmax) + " / Vmin = " + String(Vmin);
tsStatus = String(status).c_str();
//Serial.println(status);
Serial.println(tsStatus);
//delay(2000);
transferData();
Vmax = 120.0;
Vmin = 120.0;
Pmax = 0.0;
}
//------------------------------------------------------------------------------
void transferData()
//transfer data to ThingSpeak
{
Serial.println(F("transferData()")); //@
String url = "/update?api_key=" + ThingSpeak_key +
"&field1=" + energy +
"&field2=" + power +
"&field3=" + voltage +
"&field4=" + current +
"&field5=" + frequency +
"&field6=" + pf +
"&status=" + tsStatus; //String(tsStatus).c_str();
//see the notes at the top of this file.
if (!wificlient.connect(ThingSpeak, 80))
{
Serial.println(F("connection to ThingSpeak failed"));
}
else
{
wificlient.print(String("GET ") + url + " HTTP/1.1\r\n" + "Host: " +
ThingSpeak + "\r\n" + "Connection: keep-alive\r\n\r\n");
while (!wificlient.available())
{
//waiting...
}
delay(200);
}
if (gettsStatus()) Serial.println(F("Data transfer OK to ThingSpeak")); //@
}
boolean gettsStatus()
{
Serial.println(F("getStatus()")); //@
bool stat;
String _line;
_line = wificlient.readStringUntil('\n');
int separatorPosition = _line.indexOf("HTTP/1.1");
if (separatorPosition >= 0)
{
if (_line.substring(9, 12) == "200")
stat = true;
else
stat = false;
return stat;
}
}
const char* ssid = " ssid";
const char* password = " password";
const char* ThingSpeak = "api.thingspeak.com";
const String ThingSpeak_key = "xxxxxxxxxxxxxxxx"; //
unsigned long ThingSpeak_channel = ; //99999999999;
const char* ghost = "www.google.com";
const int httpPort = 80;
i want to send temperature read to field1 and ecg read to field2
how can i write the code
and i have another problem that i don't have ecg code to thingspeak
I wanted to ask of 3M messages of thingspeak free account will renew every year? Thank You
I want code for plotting windrose in matlab
I have 2 type of data for plot that is wind speed and wind direction
pls I want it quickly .
Hi, How can I draw windrose on matlab,I have attached sample data for you, sorry for the inconvenience
WHAT DOES THIS MEAN PLS?
Need help :(
Warning: 'Unable to read 500 points as requested. Only 0 points available in the channel.
Good morning,
I'm working with an Arduino MKR 1010 which takes information about weather from the website "api.openweathermap.org". On a ThingSpeak dashboard I displayed the main numbers (float) information like: temperature, wind speed, humidity, etc. Moreover, from the openweathermap I can also get string sentence (e.g. "light rain" or "broken clouds" etc.). I'm wondering if there is a way to display on the ThingSpeak dashboard string fields. Indeed, in the ThingSpeak Channel Settings I added an extra Field in order to store these string words but I don't know how to print them in the dashboard.
Someone can help me?
Thanks in advance,
Lorenzo
Hey guys, I am trying to get a certain value from this webpage (wave height in metres) and store it in a variable. whenever I test my API, I get this error. I have even tried existing examples that other people claim are working for them and they do not work for me.
Error parsing document, try a different parse string.
This is the webpage I am taking the information from.
This is the current Xpath that I am using for the swell height value I want.
/html/body/div[3]/div/main/div[3]/div[1]/mhl-datatables/div/div[1]/div/ngx-datatable/div/datatable-body/datatable-selection/datatable-scroller/datatable-row-wrapper/datatable-body-row/div[2]/datatable-body-cell[2]/div/span

Hello,
I wanna make a figure that has one image and three plots.
So, I tried to put an image the first column next to three plots, but it didn't work.
what should I do?

and, I need to make 30 figures according to my images.
how should I make code with 'for' syntex?
figure(1);
subplot(3,2,[1,5]);
width = 1;
height = 1;
img = imread('MYIAMGES.png');
image(img)
set(gca, 'units','normalized','position',[0 0 width height]) %'XTick',zeros(1,0),'YTick',zeros(1,0));
subplot(3,2,2);
plot(date,A,'-');
subplot(3,2,4);
plot(date,B,'-');
hold on
plot(date,C,'-');
plot(date,D,'-');
subplot(3,2,6);
plot(date,E,'-');
hold on
plot(date,F,'-');
When discussing Q&As in MATLAB Answers, we oftentimes need to reference a function in MATLAB Documentation. The process is quite tedious. You need to search the function in Documentation and copy & paste it into Answers. Now, you can simply use the ‘@doc:’ in Answers’ editor to easily reference a function in Documentation.
How does it work?
1) Simply type ‘@’ and you will see the option to add a Doc link. You can also directly type ‘@doc:’.

2) Start typing the function name. You will see a list of choices on the menu.

3)Select the function and a hyperlink to that function's doc page will be automatically inserted.

Give it a try and we hope you like it! Leave a comment if you have any questions or suggestions.
Hello
I am trying to run the example code for "Calculate and display average humidity" using my channel data. I filled in the blanks:
- readChannelID
- humidityFieldID
- NumMinutes=720
The program returns display(avgHumidity,'Average Humidity') with "NAN" instead of the correct average. I have a free ThingSpeak account but have been following temperature & humidity every hour for the last 9 months. I would also like to store this average value on the same channel on a new field. Can anyone help me?
Thank You