Last active
April 5, 2019 18:38
-
-
Save vixtory09678/c9e1bb41234f9c62a60628ff5ab3fac5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int temperature = getTempFromSensor(); // อ่านค่าอุณหภูมิจาก sensor แล้วเอาเช็คเงื่อนไขเพื่อทำอะไรบางอย่าง | |
if (temperature < 20){ // ถ้าอุณหภูมิน้อยกว่า 20 ให้ปิดแอร์ หนาว!! | |
closeAirCondition(); | |
} else { // แต่ถ้าไม่ใช่ก็ให้เปิดแอร์ เริ่มร้อนไง | |
openAirCondition(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment