This repository was archived by the owner on Sep 30, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-43
lines changed Expand file tree Collapse file tree 1 file changed +0
-43
lines changed Original file line number Diff line number Diff line change 16
16
#
17
17
from Adafruit_I2C import Adafruit_I2C
18
18
19
- # address = 0x39 ## Device address
20
- # control_on = 0x03 ## "On" value
21
- # control_off = 0x00 ## "Off" value
22
-
23
- # i2c = Adafruit_I2C(address)
24
-
25
- # def enable():
26
- # print "enabling"
27
- # i2c.write8(0x00, control_on) ##Writes on value to control register
28
-
29
- # def disable():
30
- # print "disabling"
31
- # i2c.write8(control, control_off) ##Writes off value to control register
32
-
33
- # def getLight():
34
- # Channel0 = i2c.readU16(0x8C) ## Read total light (from channel 0)
35
- # Channel1 = i2c.readU8(0x8E) ## Read infrared light (from channel 1)
36
- # return Channel0, Channel1
37
-
38
- # enable()
39
- # print getLight()
40
-
41
-
42
- # #!/usr/bin/env python
43
- # #
44
- # # File: $Id$
45
- # #
46
- # """
47
- # Demo code to read the Adafruit TLS2561 breakout over the i2c bus on a
48
- # Raspberry Pi
49
- # """
50
-
51
- # # system imports
52
- # #
53
- # import time
54
- # from datetime import datetime
55
-
56
- # # 3rd party imports
57
- # #
58
- # from Adafruit_I2C import Adafruit_I2C
59
-
60
-
61
-
62
19
##################################################################
63
20
##################################################################
64
21
#
You can’t perform that action at this time.
0 commit comments