machine.I2C
Re: machine.I2C
That looks like your vl53L0x.py file didn't get uploaded properly to the board. Can you verify it's there and has the correct contents?
Re: machine.I2C
Yes you right,
One of the problem was the firmware because after put firmware in ESP8266 and tried to connect by putty the command prompt doesn´t respond.
other problem was that i was using ESPlorer v0.2.0-rc5 to save script, and when i tried to save file in vl53l0x, just create the file but empty(syntax error, memory failed, etc).
The solution for my case was use pip install adafruit-ampy to save vl53l0x.py into esp8266.
Now i am getting this:
=== from machine import I2C, Pin
=== import vl53l0x
===
=== i2c = I2C(-1, Pin(5), Pin(4))
=== sensor = vl53l0x.VL53L0X(i2c)
===
=== distance = sensor.read()
=== print(distance)
===
68
>>>
This value is in mm?
One of the problem was the firmware because after put firmware in ESP8266 and tried to connect by putty the command prompt doesn´t respond.
other problem was that i was using ESPlorer v0.2.0-rc5 to save script, and when i tried to save file in vl53l0x, just create the file but empty(syntax error, memory failed, etc).
The solution for my case was use pip install adafruit-ampy to save vl53l0x.py into esp8266.
Now i am getting this:
=== from machine import I2C, Pin
=== import vl53l0x
===
=== i2c = I2C(-1, Pin(5), Pin(4))
=== sensor = vl53l0x.VL53L0X(i2c)
===
=== distance = sensor.read()
=== print(distance)
===
68
>>>
This value is in mm?
Re: machine.I2C
Yes, the value should be in mm.
Re: machine.I2C
Hi guys, somebody know how can i change the i2C address of VL53L0X, using micropython? my idea is use multiple sensor with esp8266.
Re: machine.I2C
ST has an application note on the subject: http://www.st.com/content/ccc/resource/ ... 280486.pdfkpg wrote:Hi guys, somebody know how can i change the i2C address of VL53L0X, using micropython? my idea is use multiple sensor with esp8266.
In short, you can't without additional hardware.
But since the i2c is software on the esp8266, you can have several i2c buses on different pins (I think you could even share one of the lines).
Re: machine.I2C
Hi ,
I'm interested to the vl53l0x library .
Please ,where can I find it?
Thanks Roberto.
I'm interested to the vl53l0x library .
Please ,where can I find it?
Thanks Roberto.
Thanks. Roberto