Display in small window
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (2)
Christopher Stapels
il 15 Giu 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
0 Commenti
Bob Johnson
il 16 Giu 2020
1 Commento
Christopher Stapels
il 16 Giu 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.
Community
Più risposte nel ThingSpeak Community
Vedere anche
Categorie
Scopri di più su Visualize Data in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!