-
Notifications
You must be signed in to change notification settings - Fork 0
/
uv.py
48 lines (27 loc) · 848 Bytes
/
uv.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import random
def uv():
uv = "yes"
return uv
# import RPi.GPIO as GPIO
# import time
# # Pin Definitions
# output_pin = 18 # BOARD pin 12, BCM pin 18
# def main():
# # Pin Setup:
# # Board pin-numbering scheme
# GPIO.setmode(GPIO.BCM)
# # set pin as an output pin with optional initial state of HIGH
# GPIO.setup(output_pin, GPIO.OUT, initial=GPIO.HIGH)
# print("Starting demo now! Press CTRL+C to exit")
# curr_value = GPIO.HIGH
# try:
# while True:
# time.sleep(1)
# # Toggle the output every second
# print("Outputting {} to pin {}".format(curr_value, output_pin))
# GPIO.output(output_pin, curr_value)
# curr_value ^= GPIO.HIGH
# finally:
# GPIO.cleanup()
# if __name__ == '__main__':
# main()