Guest User

Untitled

a guest
Feb 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. if temp > 30:
  2. room = "暑くないですか?"
  3. command = ["air", "cool"]
  4. led_blink("red", 5)
  5. elif temp < 15:
  6. room = "寒いですね!"
  7. command = ["air", "warm"]
  8. led_blink("red", 4)
  9. elif hum > 70:
  10. room = "蒸し蒸ししますねー"
  11. command = ["air", "dry"]
  12. led_blink("red", 3)
  13. elif hum < 50:
  14. room = "乾燥してますね!"
  15. command = ["humid", "hon"]
  16. led_blink("red", 2)
  17. elif press < 1000:
  18. room = "低気圧ですね"
  19. led_blink("red", 1)
  20. else:
  21. room = "快適です!"
  22. led_blink("green", 3)
  23.  
  24. if room:
  25. print room
  26. os.system(aquest_dir + "AquesTalkPi " + room + " | aplay")
  27. print command
  28. args = ['irsend', '-#', '1', 'SEND_ONCE', command[0], command[1]]
  29. subprocess.Popen(args)
Add Comment
Please, Sign In to add comment