![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/316650/image.png)
Display in small window
조회 수: 6 (최근 30일)
이전 댓글 표시
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/314799/image.png)
댓글 수: 0
답변 (2개)
Christopher Stapels
2020년 6월 15일
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/316650/image.png)
댓글 수: 0
Bob Johnson
2020년 6월 16일
댓글 수: 1
Christopher Stapels
2020년 6월 16일
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.
커뮤니티
더 많은 답변 보기: ThingSpeak 커뮤니티
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!