Main Content

Results for

MATLAB is the best programming language
Image Analyst
Image Analyst
Last activity on 16 Oct 2023

I love the smell of debugged MATLAB code in the morning. Smells like...Victory!
my Channel ID 2305210 and Channel ID 2300906 are not working properly. Pl.Guide me
Shore
Shore
Last activity on 16 Oct 2023

Halloween Analysis of Many Aspects of Halloween Headquarters and Effects on USA
(Note to Chistopher: I used a simple ESP8266 generating random numbers for fields 1 thru 7, (0 to 100, 4000, 127, 30, 45, 200,000, 50,000) and 0 to 1 for field 8. And a couple of real sensor inputs.
Hi there,
I hope someone can help me on this.
I have written a code to connect my SIM7600 to Thingspeak using MQTT. It is basically an aruidino code. All instructions are echo's with an OK message so assume those instrictions are correct. However, the final step, publishing the message to the MQTT server return an error : CMQTTCONNLOST : 0,1.
Any idea which instructions might be wron?
I included the commands send.
10:09:09.031 -> AT+CMQTTPUB=0,0,60,0,0
10:09:09.031 -> +CMQTTPUB: 0,0
10:09:09.031 ->
10:09:09.031 -> OK
10:09:09.031 ->
10:09:09.031 -> +CMQTTCONNLOST: 0,1
The program :
SerialAT.begin(115200, SERIAL_8N1, RXD2, TXD2);
delay(1000);
SerialAT.println("AT+CRESET"); // Reset the SIM7600 module
Read_Response(30000);
SerialAT.println("AT+IPR=115200"); // Set Baudrate of the SIM7600 module
Read_Response(30000);
SerialAT.println("AT+CSQ"); // Check signal level
Read_Response(10000);
SerialAT.println("AT+COPS?"); // Query network information
Read_Response(10000);
SerialAT.println("AT+CMQTTSTOP"); //Stop MQTT service
Read_Response(10000);
SerialAT.println("AT+CMQTTSTART"); //Start MQTT service
Read_Response(10000);
SerialAT.println("AT+CSSLCFG=\"sslversion\",0,3"); //Configure SSL contect ssl_ctxindex,sslversion <0,TLS1.2>
Read_Response(10000);
SerialAT.println("AT+CSSLCFG=\"authmode\",0,0"); //Establishing MQTT Connection <ssl_ctx_index,authmode<0,no autentification>
Read_Response(10000);
SerialAT.println("AT+CMQTTACCQ=0,\"Username\",0,4"); // Acquire a client <client_index,client_ID>
Read_Response(10000);
SerialAT.println("AT+CMQTTSSLCFG=0,0"); // Set the SSL context <session_id,ssl_ctx_index> ssl_ctx_index check AT+CSSLCFG command
Read_Response(10000);
SerialAT.println("AT+CMQTTCONNECT=0,\"tcp://mqtt3.thingspeak.com:1883\",90,1,\"Username\",\"password\""); //Connect to MQTT server <client_index,server_addr,keep_alive time,clean_session,username,password>
Read_Response_Ignore_OK(3000);
String payload="\"channels/"+ String(ChannelId)+"/publish\"";
int Payload_Length;
Payload_Length=payload.length();
SerialAT.println("AT+CMQTTTOPIC=0,"+String(Payload_Length)); // Input the publish message topic <client_index,req_length>
SerialAT.println(payload);
Read_Response_Ignore_OK(3000);
payload="field1=12&field2=13&status=MQTTPUBLISH";
Payload_Length=payload.length();
SerialAT.println("AT+CMQTTPAYLOAD=0,"+String(Payload_Length)); // input the publish message body <client_index,req_length>
SerialAT.println(payload);
Read_Response_Ignore_OK(1000);
SerialAT.println("AT+CMQTTPUB=0,0,60,0,0"); // Publish a message to the server <client_id,qos,pub_timeout,retained>
Read_Response_Ignore_OK(1000);
Serial.print(Receive_buffer);
Serial.println("And we are done");
Chen Lin
Chen Lin
Last activity on 16 Oct 2023

I'm in a community conference in Boston today and see what snacks we get! The organizer said it's a coincidence, but it's definitly a good idea to have them in our MathWorks community meetings.
Image Analyst
Image Analyst
Last activity on 3 Oct 2023

(Sorry - it should be 2023b by now.)
Calling all students! New to MATLAB or need helpful resources? Check out our MATLAB GitHub for Students repository! Find MATLAB examples, videos, cheat sheets, and more!
Visit the repository here: MATLAB GitHub for Students
To solve the puzzle, first unscramble each of the words on the left. Then rearrange the letters in the yellow shaded boxes to complete the sentence on the right.
If you enjoyed this puzzle let me know with a like or in the comments below and I'll post more of them. Please don't post your answer, or any hints, and spoil it for those who come across this puzzle after you!! If you want to check your answer, you can messge me your guess through the link on my profile card (click on my name, Rena Berman, above and then on the envelope icon in the top right corner of the profile card that appears).
Shore
Shore
Last activity on 11 Oct 2023

I wanted to write to my public channel 2278931 with 8 different values to 8 different gauge widgets.
Here is my link.
https://api.thingspeak.com/update.json?api_key=xxxxxxxxxxxxxxxx&field1=1&field2=2&field3=3&field4=4&field5=5&field6=6&field7=7&field8=8
You can change values and in the link to change gauge values. On edit I edited my write key to make it not work for others but it will work with your own key.

Up until a few weeks ago, there was a "channels shared with me" option in Thingspeak. I was able to access the channel created by a different user, only once. The next time me and my groupmate tried to open the channel, there wasn't a "channels shared with me" option anymore. Why is that and how can this be resolved?

Is there any problem from thingspeak side, from last month my data is not uploading
Currently, I am trying to setup MATLAB and Simulink to connect with Unity. But I have some questions about the installation of ROS on my computer and ROS Toolbox. I found that there are several ROS installations, so, could you please kindly help and support? Hoping that your support will help a lot to my master's thesis.
i want make web site for pre registation to the vachile in thish project i can not thinke how to register in port and how to make .....????
Harshita
Harshita
Last activity on 6 Sep 2023

Hi! Actually I'm trying to store data from 5 sensors on the ThingSpeak cloud. I was able to do it 2-3 days back, but right now I'm trying to do the same for last 2-3 hours and it's just not happening. There's nothing wrong with the code because it's getting compiled properly. I'm using
ThingSpeak.writeFields(2261556,"xxxxxxxxxxxxxxxx");
I tried printing its value after storing in a temporary variable........The value comes out to be -301. Is there any fix for this? I need it urgently for a project.
I hope to receive some help soon. Thanks!
% Sample data from channels
channel1Data = 2226948; % Your data for channel 1
% Threshold values for each alert level
threshold1 = 100;
threshold2 = 200;
threshold3 = 300;
% Initialize alert level to 0 (no alert)
alertLevel = 0;
% Check thresholds and determine alert level
if channel1Data >= threshold1 && channel1Data <= threshold2
alertLevel = 1; % Yellow Alert
elseif channel1Data >= threshold2 && channel1Data <= threshold3
alertLevel = 2; % Orange Alert
elseif channel1Data >= threshold3
alertLevel = 3; % Red Alert
end
% Define alert message based on alert level
if alertLevel == 1
alertMessage = 'Threshold exceeded for channel 1!';
elseif alertLevel == 2
alertMessage = 'Threshold exceeded for channel 2!';
elseif alertLevel == 3
alertMessage = 'Threshold exceeded for channel 3!';
else
alertMessage = 'No alert for channel 1.';
end
% Call SMS integration function with the alert message
sendMessage('+639319217695', alertMessage);
function sendMessage(number, message)
% Replace with your SMS service API endpoint and API key
apiUrl = 'https://api.semaphore.co/api/v4/messages';
apiKey = '-----';
% Compose the message payload
payload = struct('apikey', apiKey, 'number', number, 'message', message);
try
% Send the SMS using the SMS service API
response = webwrite(apiUrl, payload);
% Process the response as needed
disp('SMS sent successfully');
catch
disp('Error sending SMS');
end
end