Main Content

Results for

Hello! I am working on a project involving the use of CNNs for text classification. I found a very clear example on MathWorks that demonstrates how to transform text using an encoding process and provide it as input to a neural network. One of the initial layers of the network is the word embedding layer, which is responsible for capturing the semantic relationships between words. I'm wondering how this layer can work without directly using the words, but instead working with a numerical representation of them.
Thank you very much in advance to anyone who will reply to me.
Good morning,
I have been happily using Thingspeak for my Arduino's projects since 2018 and have never had a problem.
For one of my projects I switched to Arduino GIGA and OPTA Finder (I imagine it's a very similar hardware).
When compiling the Arduino IDE projects, it gives me an error saying that the Thingspeak library is not compatible with the hardware.
I ask you if there is on you plan to update the library or if you have any indications to be able to work with Thingspeak also with this new hardware.
Thank you very much.
When I run my matlab code, I got this error
I have guaranteed that my header size (info.raw.sizeof_hdr) is 348
but when I run niftiwrite(V, filepath, info), I also got assertion failed
Error using assert
Assertion failed.
Error in niftiwrite (line 104)
assert(headerBytes == 348||headerBytes == 540);
Error in processing_final (line 110)
niftiwrite(V{1},strcat(Folderpath,Folder(num,1).name,'\RoiVolume\RCA_revised.nii'),info{1});
How can I fix this problem ?
#include <WiFi.h>
#include <Wire.h>
#include <WireSlave.h>
#include "ThingSpeak.h"
const char* ssid = ; // your network SSID (name)
const char* password = ; // your network password
WiFiClient client;
unsigned long myChannelNumber = ; // Channel ID:
const char* myWriteAPIKey = ; // API kluc
#define SDA_PIN 13
#define SCL_PIN 14
#define I2C_SLAVE_ADDR 0x04
int hodnota;
int MenoVahy;
// Timer variables
unsigned long lastTime = 0;
unsigned long timerDelay = 30000;
void receiveEvent(int howMany);
void setup() {
Serial.begin(115200); //Initialize serial
WiFi.mode(WIFI_STA);
ThingSpeak.begin(client); // Initialize ThingSpeak
bool success = WireSlave.begin(SDA_PIN, SCL_PIN, I2C_SLAVE_ADDR);
if (!success) {
Serial.println("I2C slave init failed");
while (1)
delay(30000);
}
WireSlave.onReceive(receiveEvent);
}
void loop()
{
if ((millis() - lastTime) > timerDelay) {
if (WiFi.status() != WL_CONNECTED) {
Serial.print("Pripájam sa k sieti...");
while (WiFi.status() != WL_CONNECTED) {
WiFi.begin(ssid, password);
delay(5000);
}
Serial.println("\nPripojené.");
}
sendDataToThingSpeak();
lastTime = millis();
}
// the slave response time is directly related to how often
// this update() method is called, so avoid using long delays
// inside loop(), and be careful with time-consuming tasks
WireSlave.update();
if (MenoVahy == 2) {
Serial.println(hodnota); // print the integer
}
// let I2C and other ESP32 peripherals interrupts work
delay(1);
}
void receiveEvent(int howMany)
{
while (1 < WireSlave.available()) // loop through all but the last byte
{
MenoVahy = WireSlave.read(); // receive byte as a character
}
hodnota = WireSlave.read(); // receive byte as an integer
}
void sendDataToThingSpeak() {
// Nastavte polia s hodnotami
ThingSpeak.setField(1, 10);
ThingSpeak.setField(2, 20);
ThingSpeak.setField(3, 30);
ThingSpeak.setField(4, 40);
ThingSpeak.setField(5, 50);
ThingSpeak.setField(6, 60);
ThingSpeak.setField(7, 70);
ThingSpeak.setField(8, 80);
int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
if (x == 200) {
Serial.println("Úspešne aktualizovaný kanál.");
}
else {
Serial.println("Problém s aktualizáciou kanála. HTTP chybový kód: " + String(x));
}
}
I have carefully followed the instructions to load data into my channel without success.
1 how do I check if I have a wifi connection?
2 the following lines are my thingspeak commands
char thingSpeakAddress[] = "api.thingspeak.com";
unsigned long myChannelNumber = 2202392;
const char * myWriteAPIKey = "xxxxxxxxxxxxxxxx";
String myStatus = "";
ThingSpeak.begin( client );
ThingSpeak.setField(1, volts2);
ThingSpeak.setField(2, adc2);
I can seed the data on arduino serial monitor. I am using an ESO8266 connected to a win 10 PC
Any help will be much appreciated as I have spent a lot of time trying to solve the problem
Joe
Joe
Last activity on 21 Jun 2023

Using mqtt3.thingspeak.com, initially everything works well. but it appears the connection is disconnected after a period of inactivity. Is this expected? Is there a workaround? is some kind of keepalive expected?
Traceback (most recent call last):
File "microdot_asyncio.py", line 368, in dispatch_request
File "microdot_asyncio.py", line 432, in _invoke_handler
File "main.py", line 39, in toggle_led
File "umqtt/simple.py", line 134, in publish
OSError: [Errno 128] ENOTCONN
I have developed an MATLAB application for using as standalone or web based application which also includes trained datasets in it's code. Now i download the package having code, readme file and trained datasets. It takes online data and user input after installing its standalone function but it never shows output which it has to take from trained datasets. Kindly help what is the procedure to upload trained datasets in MATLAB standalone application.
I recently have found that I am no longer able to give my difficulty rating for questions on Cody after sucessfully completing a question. This is obviously not a big deal, I was just wondering if this was an issue on my end or if there was some change that I was not aware of.
The option to rate does not pop up after solving a problem, and the rating in general does not even show up anymore when answering questions (though it is visible from problem groups).
Hello all....
I have used MATLAB code to convert .bmp file to hex format. This converted hex file shows zero for all values.
Why such result?What is the posibility?
Please guide...
The MATLAB Answers community is an invaluable resource for all MATLAB users, providing selfless assistance and support. However, with the emergence of AI-based chatbots, like chatGPT, there may be concerns about the future relevance and utility of the MATLAB Answer community. What are your thoughts?
Wie füge ich einen Zeilenumbruch mit ThingSpeak.setStatus(Text mit Zeilenumbruch)ein?
0D 0A funktioniert nicht.
Hi,
I am using ThingSpeak with Raspberry Pi Pico W, by using python langage.
I am sending some pressure data from the raspberry with this method :
request = urequests.post('http://api.thingspeak.com/update?api_key=' + THINGSPEAK_WRITE_API_KEY, json=dht_readings, headers=HTTP_HEADERS)
And it works pretty good, i have fields with the new data every 15sec.
But now i am trying send a CLEAR request by using the following method :
url = 'http://api.thingspeak.com/channels/{}/fields/{}.json?api_key={}&days={}'.format(CHANNEL_ID, FIELD_NUMBER , THINGSPEAK_WRITE_API_KEY, NUM_DAYS )
clear_request = urequests.delete(url)
Nothing to be done.
I also tried to clean or delete directly all info in the channel and not only the fields' data by this method :
delete_url = 'https://api.thingspeak.com/channels/{}/feeds?api_key={}'.format(CHANNEL_ID,THINGSPEAK_WRITE_API_KEY)
clear_request = urequests.delete(delete_url)
Still not working.
I tired several ways, clearing the channel, deleting the channel, sending some empty update... none of them works.
Clear Channel is working only from the website when clicking on the button, i would like to do it with a request.
So to make a little summary of what i am looking for : I want to automatically send a clear request from my microcontroller to thingspeak channel 1 each X times.
Is there any way to make it possible ?
Thank you for your answer.
Sincerly Arthur
Hi all,
I am so far on a free account.
I have setup 1 channel. I am sending 3 values from a bitShake SmartMeterReader every 20 seconds to this channel.
When trying to send additional data from my solar inverter every 5min! and calculate some data coming from my bitShake (e.g. once per hour) and send it back to the channel I receive the following error:
Requests are too frequent. For further information, see Limitations in the documentation.
Now I understand that my messages (write orperations) to my channel are limited to 3 Mio / year or 8200/day. With my current setup I am at little more than 4K messages per day and since I just recently started my account I have still 2.840.531 messages left.
How come I get that error even if I switch even if my message limit is far from reached?
Thanks in advance for your time! Much appreciated!
btw. The link "Limitations" where it is supposed to be explained is not working (for me)
Hello!
Im trying to split my Data into 6 different values but the system wont work
I thought this should work, but im not sure how my data is being sent as,
its being sent as a a table, but thats about it. Anyone have any idea what ive done wrong?
Hello, Recently I have started working on a thermal management project at my Institute. I am taking some hints from en example of EV thermal management provided by MATLAB. I am having an issue in deciding how the battery current and powertrain heat load is calculated as a function of vehicle speed. It would be helpful if someone could provide some links or references regarding this. (Also, attaching a screenshot of the example for better understanding)
I've noticed a few times that a bulk update can take a while to appear. Normally a few minutes at most but at the moment it seems to be much longer, hours maybe. I know the message I sent had been received as I get an RC = 202 as normal. I sent a non bulk update via the browser and it appeared imediately.
Is this something I have to get used to ? It's a problem when I first set up a device and look at Thingspeak to check it's sending messages correctly (I send a bulk update with 1 message when it first connets). Even a single data point sent in batch form is not appearing.
Update: the data has started appearing but it's still hours behind.
I am processing ocean and climate data (1982-2022). Here, I have table which having heatwaves events details. Now, I want to sort the data month wise and also seasonal wise (summer:October- February, and winter:March-September), and then i wanted to plot mean seasonal and trend.
Sample file is attached. length of original file may vary in size.
Thanks in addvance.
I can't get my dynamic position data to display.My JASON body looks like this:
{ "api_key": "XXXXXXXXXXXXXXX", "created_at": "2023-05-15T23:17:54.000Z", "field1": 50.71875, "field2": 20.375, "field3": 4.1132812, "field4": 91.625, "field5": 1523985, "lat": -25.8152875, "long": 152.58867187500002, "status": "Bauple" }
Fields 1-4 display fine, as does the Status field. However the position map always shows a balloon at (0,0). I've tried "lat" and "latitude", "long" and "longitude", but no luck. Any ideas?
This is weird to me.
I am connected through a SIM7060 module to mqtt3.thingspeak.com on port 1883
I have an IP address., I am connected to the MQTT server.
I see the number of entries increasing in my channel. However, no data visible in the graph.
This is the AT command to the SIM7080 module : AT+SMPUB="channels/**********/publish",37,1,1
And then I send the payload : field1=1&field2=2&field3=3&field4=400
As said, each time a send a request I see the number of entries increasing, but no real data.
The export shows me this :
created_at,entry_id,field1,field2,field3,field4
2023-05-15 17:33:40 UTC,1,,,,
2023-05-15 17:34:59 UTC,2,,,,
2023-05-15 17:36:16 UTC,3,,,,
2023-05-15 17:37:31 UTC,4,,,,
2023-05-15 17:38:48 UTC,5,,,,
Any idea why the content of the field is empty?
Thanks