-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSwitchs.py
More file actions
32 lines (14 loc) · 674 Bytes
/
Switchs.py
File metadata and controls
32 lines (14 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Request_web
import Speak
def Water_on():
Speak.Speak('Water Pump Will turn on')
Request_web.web_requests('http://192.168.43.178/1/on', 'Water Pump turn on successfully')
def Water_off():
Speak.Speak('Water Pump Will turn off')
Request_web.web_requests('http://192.168.43.178/1/off', 'Water Pump turn off successfully')
def sprinkler_on():
Speak.Speak('sprinkler Will turn on')
Request_web.web_requests('http://192.168.43.178/2/on', 'sprinkler turn on successfully')
def sprinkler_off():
Speak.Speak('sprinkler Will turn off')
Request_web.web_requests('http://192.168.43.178/2/off', 'sprinkler turn off successfully')