Results for
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
In one line of MATLAB code, compute how far you can see at the seashore. In otherwords, how far away is the horizon from your eyes? You can assume you know your height and the diameter or radius of the earth.
Keep calm and study PDEs

Product Models:LPS8N dragino
Firmware Version: lgw--build-v5.4.1704801796-20240109-2005
Hi all
at the moment i can not work with CODE dragino lora to gateway LPS8N and MQTT thingSpeak.
with root commands i can send DATA to thingspeak
mosquito_pub -d -h mqtt3.thingspeak.com -p 1883 -u PSoyJxYWBTQ9Hx8cExMZ... -I PSoyJxYWBTQ9Hx8cExM.... -P hCEd77jdiziYzUV6ygl.... -t channels/2466703/publish -m “field1=100&field2=100&status=MQTTPUBLISH”
so my question there anybody that can work with LPS8N dragino to MQTT ThingSpeak? which code arduino are using?
thanks in advance to answer.
Nelson
Me at the beginning of every meeting

A bit late. Compliments to Chris for sharing.

can you relate?
I am considering to use ThingSpeak for my use case which is electric motor drive where I want to do a predictive maintanace for.
Is it possible to use ThingSpeak to develop and evaluate the AI/ML model for such purpose and the deploy on realtime microcontroller?
Dear Sir,
Is Thingspeak support jason data format???
When I am sending data in plain text fiom MQTTX, I see it in dashboard but in JASON format it is not showing in dashboard.

Can you solve it?
This Arduino ino sketch utilizes the new Arduino R4 with LED matrix. I use a thermistor to measure temperature and send it to the led MAtrix for local display and also to ThingSpeak for cloud display at public
- Channel ID: 2300884
Note: I used Christopher's suggestion (elsewhere) to start with the Arduino R4 wifi example in the example folder of the Arduino IDE. That made all the difference in the world! Plus, I had serious issues with "write" data until I watched this YouTube video.
I have a development that requires 12 fields, but ThingSpeak only offers 8. Without further subscription, can I combine 2 Channels ?
I've read thru the API refernce doc and the information in the right-hand side panel on "API Keys" tab and so I 'm pretty sure the answer is "no" but throught it was worth double-checking.
My application for this is that I have several devices, each with their own channel. For security, I'd like them to be able to deduce or calculate the write API key to their channel based on their device serial number (which each device knows) so that I don't have to store the API key in their firmware.
thanks...
Hello, I am using an Arduino UNO R3 with an ESP8266 WiFi Shield to connect 2 DHT-11 sensors to upload their data to ThingSpeak. Sometimes ThingSpeak would only post data on a certain sensor for a bit and then upload to the other randomly. I want ThingSpeak to pick up the sensors within 30-40 seconds of each other consistently. I believe there might be something wrong with my code. I was hoping to get some help on it. Anything is appreciated.
Below is provided code
SoftwareSerial esp8266(RX,TX);
void setup() {
Serial.begin(9600);
esp8266.begin(38400);
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(6000);countTrueCommand++;
String getData2 = "GET /update?api_key="+ API +"&field3="+getTemperatureValue2()+"&field4="+getHumidityValue2();
sendCommand("AT+CIPMUX=1",5,"OK");
sendCommand("AT+CIPSTART=0,\"TCP\",\""+ HOST +"\","+ PORT,15,"OK");
sendCommand("AT+CIPSEND=0," +String(getData2.length()+4),4,">");
esp8266.println(getData2);delay(6000);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);
}
String getTemperatureValue2(){
dhtObject2.read(dht_bpin);
Serial.print(" Temperature(C)= ");
int temp2 = dhtObject2.temperature;
Serial.println(temp2);
delay(50);
return String(temp2);
}
String getHumidityValue2(){
dhtObject2.read(dht_bpin);
Serial.print(" Humidity in %= ");
int humidity2 = dhtObject2.humidity;
Serial.println(humidity2);
delay(50);
return String(humidity2);
}
void sendCommand(String command, int maxTime, char readReplay[]) {
Serial.print(countTrueCommand);
Serial.print(". at command => ");
Serial.print(command);
Serial.print(" ");
while(countTimeCommand < (maxTime*1))
{
esp8266.println(command);//at+cipsend
if(esp8266.find(readReplay))//ok
{
found = true;
break;
}
countTimeCommand++;
}
if(found == true)
{
Serial.println("Pass");
countTrueCommand++;
countTimeCommand = 0;
}
if(found == false)
{
Serial.println("Fail");
countTrueCommand = 0;
countTimeCommand = 0;
}
found = false;
}
Due to temporary problem MathWorks account was unable to login. Kindly resolve this issue.
how to generate CA signed certificate for mqtt
When I embed Matlab windows into C#, I use C# to call the mouse functions such as drawline() and getpts() which are encapsulated in Matlab's dll, and then the program crashes, how can I solve this problem?
ps : The functions that I call in C# can be executed in Matlab.
ps : If I don't embed the window into C#, but just let C# call the Matlab function, it can execute the mouse control normally in the window, but once embedded into the C# window, it will crash when execute the mouse command.
I have a channel updating every 10 minutes. The last 8000 entries therefore go back to late December (around 55 days). I want to extend the range of data downloaded by setting a timescale between results, so say if I request a timescale of 20 minutes should I not be able to get data from twice as long ago? e.g.
https://api.thingspeak.com/channels/xxxxxx/fields/1.json?api_key=XXXXXXXXXXX×cale=20&start=2022-12-30%2022:00:00
No matter what timescale or averaging I use, the last 8000 entries are the only ones processed for the downloaded data, so I just get fewer results. Unless I use a timescale of 1440; then I can download results from the very first entry in 2022. A timescale of 720 or lower however will only go back 55 days.
So I see the desired result when I use a timescale of 1440, but no other timescale will work. Is this a bug?
New to ThingsSpeak. I have a Photon 2 and vreated a webhook with simple code to send random numbers reprsented as 'temp' to a channel in ThingSpeak. All good with the code and my device shows the webhook is sending data and the events corespond to the same number of entries received in my channel. However, I do not see any visual graph of the data. What am i missing?
Hi Everyone. I am facing a problem while connecting the FMU to the buses. I have one FMU which expects 9 inputs and I did clarify the same while using bus creator. But in the end i am getting this error which i am trying to solve for couple of hours but didn't get any solution. So if any knows about the same please help me. I would give details as well if you need any other information. 
