File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,6 @@ def is_raspberrypi():
223223
224224
225225class BoardsFactory :
226-
227226 def __new__ (cls , net_type ):
228227 s = sys .platform
229228 sn = s [0 ].upper () + s [1 :] # capitalize first letter
@@ -267,7 +266,7 @@ def __new__(cls):
267266 except ImportError : # microPython
268267 import vl6180x_micro
269268 i2c = get_i2c ()
270- return vl6180x_micro .Sensor (i2c , address = 0x29 )
269+ return vl6180x_micro .Sensor (i2c )
271270
272271 except NotImplementedError : # if no I2C device
273272 print ("No GPIO present." )
Original file line number Diff line number Diff line change 2121
2222class Sensor :
2323 """
24- VL6180X sensor measuring distance and ambient light
24+ Micropython library for VL6180X sensor measuring distance and ambient light
2525 """
2626 def __init__ (self , i2c , address = 0x29 ):
2727 self .i2c = i2c
@@ -44,7 +44,6 @@ def init(self):
4444 raise RuntimeError ("Failure reset" )
4545
4646 # Recommended setup from the datasheet
47-
4847 self .i2c_write (0x0207 , 0x01 )
4948 self .i2c_write (0x0208 , 0x01 )
5049 self .i2c_write (0x0096 , 0x00 )
@@ -98,7 +97,7 @@ def default_settings(self):
9897 # Additional settings defaults from community
9998 self .i2c_write (0x001C , 0x32 ) # Max convergence time
10099 self .i2c_write (0x002D , 0x10 | 0x01 ) # Range check enables
101- self .i2c_write (0x0022 , 0x7B ) # Eraly coinvergence estimate
100+ self .i2c_write (0x0022 , 0x7B ) # Early convergence estimate
102101 self .i2c_write (0x0120 , 0x01 ) # Firmware result scaler
103102
104103 def _range (self ):
You can’t perform that action at this time.
0 commit comments