Results for
I have a chart of data and need to eliminate the outliers which are making the chart look bad. Is there a configuration for this?
Hello, I try to publish to an already working channel. I have created an device and using the credentials shown in the image. I would like connect via TCP and port 1883 to mqtt3.thingspeak.com My Library always returns "Connection Refused - Bad Username or Password". This means it already has got a CONNACK reply. I have already successfully published an item to another server. So, the Lib basically works and I am using it correctly. I do not have mistyped the credentials. Could there be something on the Thingspeak side? Could you please help me with that? Thank you in advance.
VOTE on your favorite MATLAB images before Oct. 31 and win special edition T-shirts!
In just 2 weeks, 11,000 votes have been cast on 1200+ entries ! In the final week (Oct 25~Oct 31, 2021), we will add some fun and give out a T-shirt to lucky voters who cast:
- The 12000th vote
- The 12500th vote
- The 13000th vote
- The 13500th vote
- The 14000th vote
- The 14500th vote
- The 15000th vote
- The 15500th vote
- The 16000th vote
Furthermore, for every vote an entry gets, MathWorks will donate $1 to Direct Relief (Maximum amount of $20 donated per entry; maximum of $20,000 in total).
Look at the entries , and if they make you smile, VOTE!
I currently have my ThingSpeak log temp, airflow velocity raw and airflow velocity filtered. The column names show as field1, field 2 and field 3. Is there a way for me to change field1 to temperature? Thanks
In Week 3, we passed several amazing milestones! 1,000 Participants in the Treasure Hunt , 1,000 ENTRIES and 10,000 votes in the MATLAB Mini Hack , and $10,000 charity donation from both contests! I recommend you read Ned Gulley’s recent blog post , which is a fantastic summary of the contest highlights.
During the last week of this contest, we strongly encourage you to inspire your colleagues, classmates, or friends to participate by either VOTING or CREATING entries. To add some fun, we will give out a T-shirt to LUCKY voters who cast:
- The 12000th vote
- The 12500th vote
- The 13000th vote
- The 13500th vote
- The 14000th vote
- The 14500th vote
- The 15000th vote
- The 15500th vote
- The 16000th vote
MATLAB Mini Hack Winners - Week 3
We’ve received many creative entries for our new categories. Congratulations to the winners! Each of you won a special edition T-shirt:
Greg, entry: better Christmas tree , category: Holidays
Ratul Das, entry: To All Pepperoni Lovers , category: Food
Peter Stampfli, entry: Louis V , category: Fractals
Adrien Leygue, entry: Stained Glass membrane , category: MathWorks Logo
Spencer Miesner, entry: ~Breathe~ , category: Album Cover
Stewart Thomas, entry: The only QR code you ever need , category: Black & White
Sebastian Kraemer, entry: sun , category: 3D
Jenny Bosten, entry: The joys of spring , category: Plant
Adam Danz, entry: MATropolis rooftop view , category: Illustration
Eric Ogier, entry: UFO , category: Fun
Simon Thor, entry: Mandelbrot in 52 characters , category: Concise
Tim, entry: Low Tide , category: Realism
Bonus Prize Winners - Week 3
We are giving out additional giveaways to participants of both the Treasure Hunt and the MATLAB Mini Hack . Congratulations to our 5 winners. Each of you has also won a special edition T-shirt.
- Teodo
- Dyuman Joshi
- Shanshan Wang
- Nirvik Sinha
- Felipe Torres
Week 4
After the contest ends, we need additional time to validate entries for Grand Prize and Weekly Prize. The winners are expected to be announced within a couple of days after the contest ends. Thank you in advance for your patience.
Hi,
I am experiencing trouble in sending the actual sensor values to Thingspeak. I use a code template that I downloaded from a github repository https://github.com/mathworks/thingspeak-arduino/tree/master/examples/ESP32/WriteMultipleFields. The main issue is that I don't know how to fill out the source code to get real sensor values instead of random values.
I am using a DHT sensor, from which I want to measure both the temperature and the humidity. Here is what it looks like in the serial monitor after uploading the code to the ESP32 dev board.
Here is my code that I amended from the source template, and uploaded to the ESP32 board.
#include "DHT.h" #include <WiFi.h> #include "ThingSpeak.h"
// The wire is in pin 14 as required by the DHT-sensor, so it is written here: #define DHTPIN 14
// We use a DHT11-sensor #define DHTTYPE DHT110
const char* ssid = "Koti_9BE9"; // your network SSID (name) const char* password = "XXXXXXX"; // your network password
WiFiClient client;
// We write one (1) as the channel number. Assumably in that order in which they are in the MyChannels-page. unsigned long myChannelNumber = 1; const char * myWriteAPIKey = "NW34MMOB5J1NGRL2";
// Timer variables unsigned long lastTime = 0; unsigned long timerDelay = 10000; // This specifies what kind of delay we want between measurements. DHT11 // The fastest measurement interval of DHT sensors is 2000 ms (2 seconds).
// An object from where values are brought from the DHT library DHT dht(DHTPIN, DHTTYPE);
// Initialize our values. Writing down the values that need to be measured from DHT-sensors: // humidity h, temperature t, and temperature in fahrenheit-scale f float h = dht.readHumidity(); float t = dht.readTemperature(); float f = dht.readTemperature(true); String myStatus = "";
void setup() {
Serial.begin(115200);
Serial.println(F("DHT11 test!"));
dht.begin();
WiFi.mode(WIFI_STA);
ThingSpeak.begin(client); }
void loop() {
delay(20000);
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println(F("Failed to read from DHT sensor!"));
return;
} if(WiFi.status() != WL_CONNECTED){
Serial.print("Attempting to connect");
while(WiFi.status() != WL_CONNECTED){
WiFi.begin(ssid, password);
delay(5000);
}
Serial.println("\nConnected.");
}float hif = dht.computeHeatIndex(f, h);
float hic = dht.computeHeatIndex(t, h, false);
Serial.print(F("Humidity: "));
Serial.print(h);
Serial.print(F("% Temperature: "));
Serial.print(t);
Serial.print(F("°C "));
Serial.print(f);
Serial.print(F("°F Heat index: "));
Serial.print(hic);
Serial.print(F("°C "));
Serial.print(hif);
Serial.println(F("°F"));int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
if(x == 200){
Serial.println("Channel update successful.");
}
else{
Serial.println("Problem updating channel. HTTP error code " + String(x));
}
}
Many thanks for any advice.
Lauri
i have url that contains value for reading data, how can i send data to field from url that i have?
I have a project that collects data from a CO2 sensor and stored it in these ints:
CO2PPM = (int)data[2] * 256 + (int)data[3];
temperature = (int)data[4] - 40; which are defined as ints. Then just before the http request, they are processed like this:
static char outstr3[15];
static char outstr4[15];
String dataString3 = dtostrf(CO2PPM, 8, 2, outstr3);
String dataString4 = dtostrf(temperature, 8, 2, outstr4);and finally used in the GET request:
wifly.println("GET /update?api_key=apikey&field1="dataString4"&field2="+dataString3+" HTTP/1.1");which fails to successfully register the data into TS. However if I hardcode it like this:
wifly.println("GET /update?api_key=apikey&field1=23.45&field2=67.89 HTTP/1.1");it works, the data is registered.
Any idea how to fix this issue?
Greetings!
So, I'm working on a project that needs to send collected data using a SIM808 over GPRS to ThingSpeak to multiple fields. The upload interval is 2 minutes with samples taken every 10 seconds and each batch of samples includes 19 bytes of data (12 sets of 19 bytes equal 228B for each bulk data pack that has to be sent and the memory can be flushed). It's worth mentioning that I'm using an Arduino Pro Mini (ATmega328P).
I've looked at the bulk data upload example, and I'm having some trouble adapting it to the SIM808. I am also not sure how to send multiple fields using the bulk method. Unfortunately, I don't have much time to tinker with the code as the whole project had to be done in 2 days and I've only got one day to finish. I'd appreciate any help regarding this as I'm on a very tight schedule.
Thanks in advance!
We've started a new video series on how and why to use ThingSpeak. IoT from Data to Action . Most of you pros here at the forum probably already know this stuff, but there's some great overview material in these videos if you are interested. Two of four planned movies are posted, Ill let you know again when the others come out too. -Christopher
In Week 2, the contest entered a new phase – the voting started! As of today, 6000+ votes have been cast on almost 1000 entries in the GALLERY! As a result, YOU raised $5000+ for Direct Relief in addition to the $2400 raised via the Treasure Hunt contest! We encourage you to continue sharing the contest to inspire others to participate by either voting or creating new entries so we can donate even more!
MATLAB Mini Hack Winners - Week 2
I won’t say judging is getting easier in Week 2 - amazing entries keep coming in every day. Congratulations to the winners! Each of you has won a special edition T-shirt.
- Jenny Bosten, entry: Lake view to the West, category: Realism
- Jan Orwat, entry: Mannheim Colors Variation, category: Fun
- Juan Villacrés, entry: Rocket , category: Print Art
- Roderick La Foy, entry: Numerical Phoenix, category: Abstract
- Johan Pelloux-Prayer, entry: Stained glass, category: Colorful
- Brandon Caasenbrood, entry: The Aizawa's Attractor, category: 3D
- Tucker Downs, entry: Buddahbrot, category: Black & White
- Alberto Cuadra Lara, entry: Sunflower v1, category: Plants
- elkman, entry: City sunrise, category: Illustration
- Dr Raveendranathan K C, entry: A fully connected network of systems, category: Widest Remix Tree
- AKHILA GOUDA, entry: Chess board, category: Deepest Remix Tree
Bonus Prize Winners - Week 2
We are giving out additional giveaways to participants of both the Treasure Hunt and the MATLAB Mini Hack . Congratulations to our 5 winners. Each of you has also won a special edition T-shirt.
- Simon Thor
- Eric Ogier
- David Hill
- Lyes Demri
- Highphi
What’s new in Week 3?
In Week 3, we will add several new categories in which we hope to see more creative entries:
- Holidays
- Album covers
- Food & Drinks
- MathWorks logo
- Fractals
Categorical navigation is now available in MATLAB Answers.
- Categories empower you to find, watch, and answer questions by topic and product, rather than product alone.
- Individual answers have been categorized using an AI model written by MathWorks developers. Read more about our method here.
FAQ
1. What if I've bookmarked or subscribed to a product?
The links will continue to work but use a different filter mechanism. We encourage you to try the new category filter, to find more questions in your topic of interest.
2. Can I still select a product on the question?
Yes - and product and tags are factored into the text analytics algorithm. Correcting those fields should improve the nightly categorization.
Categories are also shown in the Help Center.
Check out your favorite topic of interest and let us know how we're doing in the comments below!
Hello! I have been working on an app for viewing thingspeak numerical data as graphs and I'm planning to publish it on playstore soon. If anybody is interested to test the beta version I would appreciate it. Here is the link https://play.google.com/apps/testing/com.mlundell.theThingV
ThankYou !
Magnus
I have both of my account profile and channel export time zones set to "(GMT+8000)Beijing". The datetime from the exported feeds.csv looks like:
'2021-09-06 11:16:28 CST'
I want to import data, but MATLAB do not directly understand its datetime format. I assume "CST" to be "China Standard Time", but when I try to convert it to datetime, MATLAB throws an error:
>> datetime(s,'InputFormat',"yyyy-MM-dd HH:mm:ss z","TimeZone","Asia/Shanghai","Locale","zh_CN") Error using datetime (line 651) Unable to convert '2021-09-06 11:16:28 JST' to datetime using the format 'yyyy-MM-dd HH:mm:ss z' and locale 'zh_CN'.
However if I change the "Locale" to US instead:
>>datetime(s,'InputFormat',"yyyy-MM-dd HH:mm:ss z","TimeZone","Asia/Shanghai","Locale","en_US")
ans =
datetime
07-Sep-2021 01:16:28
There is no error, but the time is wrong and is 14 hours ahead. So I guess that MATLAB sees this "CST" as "Central Standard Time".
My point is:
- It's pretty strange that the datetime exported by ThingSpeak could not be directly understood by MATLAB. MATLAB is supposed to work with ThingSpeak data seamlessly, but now I have to find a detour to import ThingSpeak data to MATLAB.
- It seems that the datetime function needs improvement to understand this "CST" timezone, or that ThingSpeak could improve its datetime output format.
In just one week, 500+ amazing entries were created. Math rocks and you rock!
Help us show the world the beauty of mathematics by sharing your work with your friends, classmates, or colleagues. You can also help fight the global pandemic by voting. For each vote, MathWorks will donate $1 to Direct Relief. See the Voting FAQs below for details.
MATLAB Mini Hack Winners - Week 1
Let’s start by saying: your awesome work made our judging VERY HARD! We came up with several categories with one winner each. Congratulations to the winners! Each of you won a special edition T-shirt:
- Adam Danz, entry: pale blue dot , category: Astronomy
- taozim, entry: Collatz Feather , category: Print Art
- Jr, entry: Hi :) , category: 3D Art
- Pink_panther, entry: Guarding Ape of the Math Jungle 1 , category: Animals
- Adrien Leygue, entry: random cut in a d-dimensional checkerboard, category: Black & White
- Barath Narayanan, entry: Julia Set Animation , category: Colorful
- Maximilian Schönau, entry: plot Dark Side , category: Illustration
- Sebastian Kraemer, entry: Cherry blossom tree , category:Plants
- Peter Stampfli, entry: broken inversions , category: deepest remix tree (tie)
- sandeep singh chauhan, entry: BLACK ORCHID, category: deepest remix tree (tie)
- KSSV, entry: I LOVE Matlab, category: widest remix tree
Bonus Prize Winners - Week 1
As we announced last week, we are giving additional giveaways to participants of both the Treasure Hunt contest and the MATLAB Mini Hack contest . Congratulations to our 5 winners. Each of you also won a special edition T-shirt
- Jan Orwat
- warnerchang
- Davide OLIVIERI
- Daniel Niblett
- KARUPPASAMYPANDIYAN M
Voting FAQs:
Q1: Who can vote?
Anyone with a MathWorks account can vote.
Q2: How many times can I vote?
There here is no limit to the number of votes you can cast. Vote for as many entries as you like (one vote per entry).
Q3: How do my votes increase MathWorks’ charity donation?
For every vote an entry gets, we will donate $1 to Direct Relief with a maximum amount of $20 donated per entry. MathWorks will donate up to a maximum of $20,000 based on the combined totals raised by task participation in the Treasure Hunt and voting in the MATLAB Mini Hack .
Q4. How do I win?
At the end of the contest, the top 10 participants on the leaderboard will each get an Amazon gift card and the top 3 will earn special badges. The 10 highest voted entries will win 5 customized T-shirts. See the full contest details.
Every week, we will also award surprise prizes for more fun.
Note that MathWorks staff are NOT eligible for prizes.
Q5: How do votes on my entries determine my rank on the leaderboard?
The total number of votes on ALL of your entries determines your rank on the leaderboard.
Q6: Do votes on remixed entries add votes to the original entry?
No. We count only direct votes on an entry.
Q7: Is the code (also) automatically compared to earlier submissions to determine the remix tree?
No. You have to remix an entry.
What amazing images can be created with no more than 280 characters of MATLAB code? Check out the GALLERY of 700+ entries from the MATLAB Mini Hack contest.
VOTE on your favorite images and help fight the global pandemic! For every vote an entry gets, MathWorks will donate $1 to Direct Relief *.
How can I vote?
1) You need to log in with your MathWorks Account. If you do not have a MathWorks Account, you can create one at MathWorks sign in .
2) You can vote for an entry by clicking on the heart icon on an entry card or the vote button on the entry detail page.
*Maximum amount of $20 donated per entry; maximum of $20,000 donated based on the combined totals raised from the Treasure Hunt contest and the MATLAB Mini Hack contest.
Just in 2 days since the contest started, we already have 200+ awesome entries in the MATLAB Mini Hack contests. We are excited to see so many talented and creative community members enjoying the contest and learning from each other.
If you haven’t created your entry, try remixing an entry you like. Make some SMALL changes and see what it would look like. Remix is highly encouraged in this contest.
If you haven’t entered the Treasure Hunt contest, give it a try. Your participation will not only win you a prize but also bump up MathWorks’ donation to a charity organization that fights the global pandemic.
Reminder:
- Voting will start next Monday.
- Weekly surprise giveaways will also be announced next Monday. Still time left to create your entries, original or remixed!