How do I write to a ThingSpeak channel from a Raspberry pi via code deployed using the Matlab Coder?
Show older comments
I am making use of the Matlab Coder to deploy Matlab functionality to a Raspberry pi. I would like to be able to deploy the ability to write to a ThingSpeak channel from the pi. I realise that this is possible using Simulink (via the ThingSpeak block) but was wondering if there is a simple way to do this via code deployed using the Matlab Coder. I have tried the obvious and found that the Matlab Coder does not recognise the ThingSpeakWrite command. However, it also doesn’t appear to be very straightforward to deploy http methods to enable updating the channel via the POST method. Any advice welcome.
1 Comment
John Anderson
on 21 Jun 2019
Answers (1)
As you said, there is a block in the Raspberry Pi Support Package that you can use.
Curious why you don't want to use the built-in blocks.
5 Comments
John Anderson
on 10 Sep 2019
Raphael Mukaro
on 20 Nov 2020
Hi John
The code you gave above doesnt seem to work?
John Anderson
on 20 Nov 2020
Raphael Mukaro
on 24 Nov 2020
John, thanks man for your brilliance! I can now update my thingspeak channel using the pi via code deployed using MATLAB coder. I have been struggling for months. Appreciated!!!
John Anderson
on 24 Nov 2020
Communities
More Answers in the ThingSpeak Community
Categories
Find more on Visualize Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!