Results for
I use "x = ThingSpeak.writeFields(myChannelNumber1, myWriteAPIKey1);" in my code to update the ThingSpeak channel. 4 fields are associated with this channel. This statement is executed about once every 5 minutes.
Roughly 60% of the time, I got an error message "HTTP error code -301". The other 40% of time the channel update is successful. What does the "HTTP error code -301" mean? Any suggestion on how to improve the success rate of the channel update
function ans = your_fcn_name(n)
n;
j=sum(1:n);
a=zeros(1,j);
for i=1:n
a(1,((sum(1:(i-1))+1)):(sum(1:(i-1))+i))=i.*ones(1,i);
end
disp
I am trying to earn my Intro to MATLAB badge in Cody, but I cannot click the Roll the Dice! problem. It simply is not letting me click it, therefore I cannot earn my badge. Does anyone know who I should contact or what to do?
Problem statement: I've written a visualization that I'd like to use on potentially hundreds of different channels in my commerical account. Because it contains code that's unique to the channel (channel id, read API key, etc.) I have to create and maintain a duplicate visualization for each channel. This is wasteful, a source of errors, and almost intractable for a commercial customer with a high channel count.
My request is that MATLAB Visualizations be extended to support parameters, but only a predefined set to reduce the scope. I would propose a subset of the parameters currently supported by the ThingSpeak API. For example, thingSpeakRead supports (requires) readChannelID, NumPoints, and a ReadKey etc. If those were elevated to also be allowed as Visualization parameters, I imagine it would satisfy a large subset of user needs.
The poor man's version of this would be if ThingSpeak supported just one special parameter, such as %CHANNEL_ID%. If this was available within the visualization code one could use it as a key into table to get the other pieces of data like API keys, etc. It would be have to be passed on the visualization url (https://thingspeak.com/apps/matlab_visualizations/573779?readChannelID=xxxxx). Not sure how the visualization would pick it up in the use case where it's called from the ThingSpeak website under the user's list of MATLAB Visualizations. Perhaps it can be prompted for.
I initially considered user defined functions or libraries but they are not supported and I can see that that would require even more development work to support. The workarounds described in this thread aren't suitable for me. https://www.mathworks.com/matlabcentral/answers/2102981-how-to-use-private-functions-lib-in-thingspeak?s_tid=srchtitle_community_thingspeak_14_libraries
thanks!
Tom
how can I link a chinese flow meter to this website
Die Anzeige der Werte in den einzelnen Feldern ist nicht aktuell.
So werden z.B. um 18:00 Uhr nur die Werte bis 14:00 Uhr angezeigt, auch das verändern des Zeitfensters bringt keine Abhilfe.
Hat jemand eine Idee wie ich die der Uhrzeit ensprechenden Werte zur Anzeige bringe.
Die Werte werden von Shellies und BitShake kontinuierlich übertragen.
My thingSpeak channel kept on updateing the same signal as early eventhough my simulink have update the new signal. How to solve this?
Hi ThingSpeak Community,
I hope you are all doing well.
I am currently setting up a Vodafone ACL for a SIM card that will be used in a device destined for a remote charity deployment in a week. The goal is to ensure that the device can reliably upload data to ThingSpeak without any connectivity issues.
Here are the details of my current ACL setup:
- FQDN: api.thingspeak.com (specified as the API endpoint)
- IPv4 Address: 184.106.153.149 (found online)
- Port: (left empty)
I've attached a photo of the setup for reference.
Could you please confirm if the above ACL settings are correct? Additionally, if there are any other considerations or settings I should be aware of for ensuring reliable connectivity with ThingSpeak, I would greatly appreciate your guidance.
Currently, all I am using for the device credentials is the PIN number. Do I need to adjust any settings in the Arduino code or the ACL to maintain stable connectivity with ThingSpeak, especially considering the device will be in a remote location and difficult to access for adjustments?
Your prompt assistance and advice will be immensely valuable, as I want to ensure everything is correctly configured before deployment.
Thank you very much!
Best regards,
Arthur
Twitch built an entire business around letting you watch over someone's shoulder while they play video games. I feel like we should be able to make at least a few videos where we get to watch over someone's shoulder while they solve Cody problems. I would pay good money for a front-row seat to watch some of my favorite solvers at work. Like, I want to know, did Alfonso Nieto-Castonon just sit down and bang out some of those answers, or did he have to think about it for a while? What was he thinking about while he solved it? What resources was he drawing on? There's nothing like watching a master craftsman at work.
I can imagine a whole category of Cody videos called "How I Solved It". I tried making one of these myself a while back, but as far as I could tell, nobody else made one.
Here's the direct link to the video: https://www.youtube.com/watch?v=hoSmO1XklAQ
I hereby challenge you to make a "How I Solved It" video and post it here. If you make one, I'll make another one.
The Ans Hack is a dubious way to shave a few points off your solution score. Instead of a standard answer like this
function y = times_two(x)
y = 2*x;
end
you would do this
function ans = times_two(x)
2*x;
end
The ans variable is automatically created when there is no left-hand side to an evaluated expression. But it makes for an ugly function. I don't think anyone actually defends it as a good practice. The question I would ask is: is it so offensive that it should be specifically disallowed by the rules? Or is it just one of many little hacks that you see in Cody, inelegant but tolerable in the context of the surrounding game?
Incidentally, I wrote about the Ans Hack long ago on the Community Blog. Dealing with user-unfriendly code is also one of the reasons we created the Head-to-Head voting feature. Some techniques are good for your score, and some are good for your code readability. You get to decide with you care about.
I have lon and lat and signal stengths plotting from my roaming GPS Lora module that reports signal strength to Thingspeak at it's location. I got GEOSCATTER plotting location circles.But i want extrapulate?Interp?Heatmap. the stengths between the points. When i use Interp i end up timiming out. How do i modify my code to do this?
Public Channel 214526
Cheers Andy
There are a host of problems on Cody that require manipulation of the digits of a number. Examples include summing the digits of a number, separating the number into its powers, and adding very large numbers together.
If you haven't come across this trick yet, you might want to write it down (or save it electronically):
digits = num2str(4207) - '0'
That code results in the following:
digits =
4 2 0 7
Now, summing the digits of the number is easy:
sum(digits)
ans =
13
Hello and a warm welcome to everyone! We're excited to have you in the Cody Discussion Channel. To ensure the best possible experience for everyone, it's important to understand the types of content that are most suitable for this channel.
Content that belongs in the Cody Discussion Channel:
- Tips & tricks: Discuss strategies for solving Cody problems that you've found effective.
- Ideas or suggestions for improvement: Have thoughts on how to make Cody better? We'd love to hear them.
- Issues: Encountering difficulties or bugs with Cody? Let us know so we can address them.
- Requests for guidance: Stuck on a Cody problem? Ask for advice or hints, but make sure to show your efforts in attempting to solve the problem first.
- General discussions: Anything else related to Cody that doesn't fit into the above categories.
Content that does not belong in the Cody Discussion Channel:
- Comments on specific Cody problems: Examples include unclear problem descriptions or incorrect testing suites.
- Comments on specific Cody solutions: For example, you find a solution creative or helpful.
Please direct such comments to the Comments section on the problem or solution page itself.
We hope the Cody discussion channel becomes a vibrant space for sharing expertise, learning new skills, and connecting with others.
Hallo zusammen,
seit ein paar Tagen werden sämtliche meiner Visualisierungen nicht mehr aktualisiert. Im Editiermodus läuft der Code durch und die Grafik wird korrekt erzeugt.
Hat jemand eine Idee was da schief läuft?

Danke & viele Grüße
Hi Helpdesk,
I urgently seek assistance with an issue that has persisted for a week. I am using Node-RED to interface my gateway and vibration sensor. The sensor sends 960 packets of X, Y, and Z data every 5 minutes. I retrieve and send this data through my Thingspeak42 node to my Thingspeak channel.
I am subscribed to the Thingspeak Student paid plan (see attached "12.png"). Despite this, Thingspeak is inconsistently snipping my data. For example, my X-field sometimes receives only 78 out of 960 points, and similar inconsistencies occur with the Y and Z fields.
Attached is "vibration data node red.png," showing an attempt to send just 120 packets to my Thingspeak channel. However, only 93 data points are received. Also attached is a JSON snapshot of field 2 - X_values, showing only 93 points ("JSON Field 2 data.png"). This is disappointing given that I am paying for the student plan, which should support 33 million points/year per unit (~90,000/day per unit).
I urgently require an explanation and resolution for this issue. Please provide immediate assistance.
Kind regards,
Krish
I have an Arduino Uno R3 with an integrated ESP 8266. With the Arduino Uno, I measure some capacitive humidity sensors and a DHT 22 temperature and humidity sensor. The measurements are sent to the serial port and the ESP 8266 picks them up and uploads them to ThingSpeak. My problem is that it does this randomly and not in the assigned fields. Could someone help me? Thank you very much
Hi team,
Could you please confirm us about the process power and computational capacity of ThingSpeak i.e. how quickly and efficiently my MATLAB code can execute on ThingSpeak? What other specifications related to data communication and integration are there in ThingSpeak? As all specifications are not mentioned here: https://thingspeak.com/prices/thingspeak_academic
Thanks.
Regards,
Tanusree
WebSend zu "api.thingspeak.com" zeigt übermittelte Daten an, auf thingspeak kommt aber nichts an.
V11:54:37.665 SCR: performs "WebSend [api.thingspeak.com] /update,json?api_key=***&field1=14039.05&field2=35517.69&field3=-3986.00"
Hat jemand eine Idee warum?
Hi,
I'm a Analysis and systems development student.
Last friday i've created a GPS tracker, using thingspeak api and server, it was working fine until this morning, now it stops.
what could have happened?
i've not even touched the code these days
I isolated a var that I'm interested in, and I want to connect Node-RED to thingspeak to show the values on the graph. The problem is the node "mqttout": I connected it to the server mqtt3.thingspeak.com and the port 1883, and with the device with right username and password. It shows "connected", but the graph is still the same, I can not upload the varabiles.