How can you create alert when making a digital temperature using arduino on GUI
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to create a digital thermometer using Arduino. I also want to make sure there is an alert on high or low-temperature changes. Not sure how to create the alert.
2 Commenti
Achyutha Hosahalli
il 16 Ott 2017
Hi Refat !
You can follow this video to create digital thermometer using arduino on GUI. To create an alert,once you read the temperature, you can have a conditional statement (if/else) to check the threshold values for high/low temperatures and use an edit box to display the alert by setting it with alert text. For example, when a push button is pressed, the below code snippet can be executed
x = 0;
global a;
v = readVoltage(a,'A0');
analog = (v/0.00488745);
temp = analog*0.48828125;
set(handles.edit1,'String',num2str(temp)); % edit1 is the tag of edit box used to display the temperature
if temp > 40
set(handles.edit2,'String','HIGH'); % edit2 is the tag of edit box used to display the alert
elseif temp < 5
set(handles.edit2,'String','LOW');
else
set(handles.edit2,'String','');
end
Risposte (0)
Vedere anche
Categorie
Scopri di più su Arduino Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!