Main Content

Results for

I have a LORA node up-linking data to a Thingspeak channel via The Things Network (TTN). Sometimes it stops sending data and I reboot it by logging into my console on TTN and sending a re-boot down-link message to the node. Is there any way I can transmit a downlink message to the node direct from Thinkspeak?
Aliff
Aliff
Last activity on 18 Apr 2024

Hi may iknow why when i add widget gauge, the guage dont show the display
How long until the 'dumbest' models are smarter than your average person? Thanks for sharing this article @Adam Danz
Feature Request -- To add section highlighting to the editor, just like in 2021a!
Hi guys
This is regarding my shared ThingSpeak channel. Previously it was showing the widgets side by side but in recent days it's showing widget under widget.
Why is that? Please help.
#include <WiFiS3.h>
#define LDR_PIN A0 // LDR sensor pin
#define WIFI_SSID "Nahi Chalega"
#define WIFI_PASSWORD "12234556889"
#define THINGSPEAK_HOST "api.thingspeak.com"
#define THINGSPEAK_API_KEY "xxxxxxxxxxxxxxxx" // Replace YOUR_API_KEY with your ThingSpeak Write API key
#define CHANNEL_ID "2498369" // Replace YOUR_CHANNEL_ID with your ThingSpeak channel ID
WiFiSSLClient client;
void setup() {
Serial.begin(9600);
connectWiFi();
}
void loop() {
int ldrValue = analogRead(LDR_PIN); // Read LDR sensor value
Serial.print("LDR Sensor Value: ");
Serial.println(ldrValue);
sendToThingSpeak(ldrValue);
delay(2000); // Send data every 20 seconds
}
void connectWiFi() {
Serial.println("Connecting to WiFi");
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("\nConnected to WiFi");
}
void sendToThingSpeak(int value) {
if (client.connect(THINGSPEAK_HOST, 80)) {
String data = "field1=" + String(value);
String request = "POST /update HTTP/1.1\nHost: " + String(THINGSPEAK_HOST) + "\nConnection: close\nX-THINGSPEAKAPIKEY: " + String(THINGSPEAK_API_KEY) + "\nContent-Type: application/x-www-form-urlencoded\nContent-Length: " + String(data.length()) + "\n\n" + data;
client.print(request);
Serial.println("Data sent to ThingSpeak!");
} else {
Serial.println("Failed to connect to ThingSpeak!");
}
client.stop();
}
MatGPT was launched on March 22, 2023 and I am amazed at how many times it has been downloaded since then - close to 16,000 downloads in one year. When AI Chat Playground came out on MATLAB Central, I thought surely that people will stop using MatGPT. Boy I was wrong.
In early 2023 I was playing with the new shiny toy called ChatGPT like everyone else but instead of having it tell me jokes or haiku, I wanted to know how I can use it on MATLAB, and I started collecting the prompts that worked. Someone suggested I should turn that into an app, and MatGPT was born with help from other colleagues.
Here is the question - what should I do with it now? Some people suggested I could add other LLMs like Gemini or Claude, but I am more interested in learning how people actually use it.
If you are a MatGPT user, do you mind sharing how you use the app?
David
David
Last activity on 1 Apr 2024

I was in a meeting the other day and a coworker shared a smiley face they created using the AI Chat Playground. The image looked something like this:
And I suspect the prompt they used was something like this:
"Create a smiley face"
I imagine this output wasn't what my coworker had expected so he was left thinking that this was as good as it gets without manually editing the code, and that the AI Chat Playground couldn't do any better.
I thought I could get a better result using the Playground so I tried a more detailed prompt using a multi-step technique like this:
"Follow these instructions:
- Create code that plots a circle
- Create two smaller circles as eyes within the first circle
- Create an arc that looks like a smile in the lower part of the first circle"
The output of this prompt was better in my opinion.
These queries/prompts are examples of 'zero-shot' prompts, the expectation being a good result with just one query. As opposed to a back-and-forth chat session working towards a desired outcome.
I wonder how many attempts everyone tries before they decide they can't anything more from the AI/LLM. There are times I'll send dozens of chat queries if I feel like I'm getting close to my goal, while other times I'll try just one or two. One thing I always find useful is seeing how others interact with AI models, which is what inspired me to share this.
Does anyone have examples of techniques that work well? I find multi-step instructions often produces good results.
%%
clear
clc
close all
% TODO - Replace the [] with channel ID to write data to:
writeChannelID = 'your channel ID'; %channel ID
% TODO - Enter the Write API Key between the '' below:
writeAPIKey = 'your write API Key'; %write API Key
% url for POST request
url = 'https://aemo.com.au/';
webText = webread(url);
filteredData(4) = urlfilter(url,'<div class="summary-row-value">');
display(filteredData(4), 'AEMO');
thingSpeakWrite(writeChannelID, filteredData(4), 'WriteKey', writeAPIKey);
Edward
Edward
Last activity on 3 Apr 2024

The cloks have changed in the UK having gone forward 1 hour but the times on the thingspeak graphs are out an hour - what is the solution please
Gabriel
Gabriel
Last activity on 29 Mar 2024

I keep getting this error, what do I do?
Error: File: convert_mnist_to_mat.m Line: 63 Column: 1
This statement is not inside any function.
(It follows the END that terminates the definition of the function
"read_mnist_labels".)
function convert_mnist_to_mat(mnist_dir, output_file)
% Function to convert MNIST dataset files into .mat format
% Check if the directory exists
if ~isfolder(mnist_dir)
error('MNIST directory does not exist.');
end
% Read training images
train_images = read_mnist_images(fullfile(mnist_dir, 'train-images-idx3-ubyte'));
% Read training labels
train_labels = read_mnist_labels(fullfile(mnist_dir, 'train-labels-idx1-ubyte'));
% Read test images
test_images = read_mnist_images(fullfile(mnist_dir, 't10k-images-idx3-ubyte'));
% Read test labels
test_labels = read_mnist_labels(fullfile(mnist_dir, 't10k-labels-idx1-ubyte'));
% Save data into .mat file
save(output_file, 'train_images', 'train_labels', 'test_images', 'test_labels');
disp('MNIST dataset converted successfully.');
end
function images = read_mnist_images(filename)
% Function to read MNIST image data
fid = fopen(filename, 'rb');
assert(fid ~= -1, ['Could not open ', filename, '']);
magic_number = fread(fid, 1, 'int32', 0, 'ieee-be');
assert(magic_number == 2051, ['Invalid magic number in ', filename]);
num_images = fread(fid, 1, 'int32', 0, 'ieee-be');
num_rows = fread(fid, 1, 'int32', 0, 'ieee-be');
num_cols = fread(fid, 1, 'int32', 0, 'ieee-be');
images = fread(fid, [num_rows, num_cols, num_images], 'uint8');
fclose(fid);
images = permute(images, [2, 1, 3]); % Convert from (rows, cols, images) to (cols, rows, images)
end
function labels = read_mnist_labels(filename)
% Function to read MNIST label data
fid = fopen(filename, 'rb');
assert(fid ~= -1, ['Could not open ', filename, '']);
magic_number = fread(fid, 1, 'int32', 0, 'ieee-be');
assert(magic_number == 2049, ['Invalid magic number in ', filename]);
num_labels = fread(fid, 1, 'int32', 0, 'ieee-be');
labels = fread(fid, [num_labels, 1], 'uint8');
fclose(fid);
end
% Usage example:
mnist_dir = 'C:\Users\gabep\Desktop\MNIST';
output_file = 'mnist_dataset.mat';
convert_mnist_to_mat(mnist_dir, output_file);
Hi everyone, I need help for transfering the data from a ThingSpeak' channel to Google Sheets. Please help me.
Suppose I want to use tiledlayout to draw a 4*6 figure. Now I want to let the first and second row of figures share the same ylabels, and so do the third and the fourth. But I did not find a way to do this. I tried to create two different tiledlayout on one figure, but tiledlayout did not allow me to do so. Thus, any suggestions?

Englisch Translate Französisch Deutsch Deutsch Russisch PONS Deepl übersetzer Spanisch Deutsch DeepL kostenlos Deutsch Englisch hallo, ich bitte um Hilfe! Seit Jahren habe ich Konto auf Thingspeak, den ich für meinen Zweck nicht richtig nutzen kann. Ich kann "Upoad to meine private Chanel", aber das lesen funktioniert nicht, weder in ArdunioIDE, noch Ardunio iot kann ich die gesendete Daten (Temperatur) von einem anderen Board lesen, es ist egal, ob ESP8266, ESP32, MKR, oder UnoWifi Rev2. Nichts! Die Beispiele im Bibliotek sind eine Katastrophe, "wetter-chanel" und diese funktionieren auch nicht. Auch nicht die von GitHub. Es sollte aber einfach sein, denn auf meiner Seite sehe ich ja "GET"+ url. inkl json+result.

Wo gibt es eine richtige sketch für "read private chanel/field" , welche funktioniert? Man braucht nicht die Wifi-Enstellungen, sondern den code für die Abfrage, "Serial.print"(value)"

Bitte um Hilfe, danke schön.

hello, I ask for help! I've had an account on Thingspeak for years, but I can't use it properly for my purpose. I can "Upoad to my private Chanel", but reading doesn't work, neither in ArdunioIDE nor Ardunio iot can I read the sent data (temperature) from another board, it doesn't matter whether ESP8266, ESP32, MKR, or UnoWifi Rev2. Nothing! The examples in the library are a disaster, "weather-chanel" and they don't work either. Not even the one from GitHub. But it should be easy, because on my site I see “GET”+ url. including json+result.

Where is there a proper sketch for "read private chanel/field" that works? You don't need the WiFi settings, but the code for the query, "Serial.print"(value)"

Please help, thank you very much.

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:
  1. 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.
  2. 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
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
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?
Pranab
Pranab
Last activity on 13 Mar 2024

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