Display in small window

9 views (last 30 days)
Bob Johnson
Bob Johnson on 12 Jun 2020
I save 2 temperature readings every 5 minutes to ThingSpeak and can plot details onto a graph. That works fine. ThingSpeak you are brilliant.......
What I now want is a small box to show the last readings as shown on the enclosed example. This one is made using an excel userform but has drawbacks. The example shows it alongside the taskbar clock which indicates how small it is.
Have tried AutoHotKey which looks the same and works fine but is compiled into an EXE file which has complications in distribution to a small number of users
I am looking for an alternative way to create the box and display data. Have no problem getting the data and parsing it from ThingSpeak using javascript, but am looking for a way to display it. Have 'googled' and come up with topics like headless, JS, CSS but can't find any small projects that I can understand.
Besides the box, I would also like it to be always-on-top, draggable to anywhere on screen and easy to share - ideally with URL link.
Any help would be greatly appreciated. I should image that others would also find this useful
Bob J

Answers (2)

Christopher Stapels
Christopher Stapels on 15 Jun 2020
I used appdesigner in MATLAB. I put the following code in the startup function. It updates every 10 seconds. Plus, the window changes color when you tweet a color @cheerlights.
while(1)
data = thingSpeakRead(1417,'outputformat','timetable');
app.Field1ValTextArea.Value = data.LastCheerLightsCommand;
app.Field2ValTextArea.Value = data.CheerLightsHEXColor;
val1= hex2dec(data.CheerLightsHEXColor{1,1}(2:3))/255;
val2= hex2dec(data.CheerLightsHEXColor{1,1}(4:5))/255;
val3= hex2dec(data.CheerLightsHEXColor{1,1}(6:7))/255;
app.UIFigure.Color=[val1,val2,val3];
app.lastUpdate.Text = string(datetime('now'));
pause(10);
drawnow
end

Bob Johnson
Bob Johnson on 16 Jun 2020
Hi Christopher,
Thanks for the response.
That looks ideal. Does app designer need to be downloaded?
I viewed an example video and it doesn't look too difficult.
Thanks again
Bob
  1 Comment
Christopher Stapels
Christopher Stapels on 16 Jun 2020
App designer requires a MATLAB license. The MATLAB component that ThingSpeak runs does not support app designer. I should have included that in my original answer.
You can download a trial here.

Sign in to comment.

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!