kevinmcaleer / vl53l0x

21 stars 11 forks source link

Error running on Pico W #2

Open tobz-nz opened 1 year ago

tobz-nz commented 1 year ago

Hi,

I'm trying to get this working on a Pico W (MicroPython v1.20.0 on 2023-04-26; Raspberry Pi Pico W with RP2040)

but I'm getting this error when trying to initialise the VL53L0X class.

>>> 
>>> 
setting up i2c 0
[41]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tof_test.py", line 37, in <module>
  File "vl53l0x.py", line 117, in __init__
  File "vl53l0x.py", line 200, in init
  File "vl53l0x.py", line 356, in _spad_info
TimeoutError: 

I also tried this fork or this repo which has some extra checks in place: https://github.com/orionrobots/vl53l0x/blob/main/vl53l0x.py#L177-L185

But I don't understand what any of that stuff means - I'm a novice to HW.

Any chance you might know what's going on and what I could look at to sort it out?

Maybe something due to the newer version of micropython or the newer board?

Chris-DeH commented 1 year ago

Hi Kevin,

I am having the same issue here. I am trying to get this to run on a PICO-W but same problem as person above. Runs good on regular PICO.

Hopefully you can help us out.

Chris

fabse-hack commented 11 months ago

same problem here on esp32 s3 with micropython 1.21

fabse-hack commented 11 months ago

solved: the sensor need 3,3 V ... with 5V i get the same error

tobz-nz commented 11 months ago

@fabse-hack The pico is 3.3v, so different problem maybe...?

fabse-hack commented 11 months ago

@fabse-hack The pico is 3.3v, so different problem maybe...?

Then you use the wrong pins 🤔

tobz-nz commented 11 months ago

@fabse-hack pretty sure I've got it right..

image IMG_0599

fabse-hack commented 11 months ago

@fabse-hack pretty sure I've got it right..

image IMG_0599

Hmm yes, for me it looks correct too. Maybe you can test another pins for SCL and SDA ?? GP20 & GP21 .. you can come to the Micropython discord server too, for solve the problem ✌️

tobz-nz commented 11 months ago

@fabse-hack Did that - same result.

fabse-hack commented 11 months ago

@fabse-hack Did that - same result.

How you call it in the main.py programm?

tobz-nz commented 11 months ago

@fabse-hack yes.

fabse-hack commented 11 months ago

@fabse-hack yes.

I think is everything correct, only the pins are wrong.

Better you come in the Micropython discord or in the Micropython Facebook group ✌️

tobz-nz commented 11 months ago

@fabse-hack I've got to get to work now, but I'll jump in and hit you at some point :) what's the server url?

fabse-hack commented 11 months ago

@fabse-hack I've got to get to work now, but I'll jump in and hit you at some point :) what's the server url?

https://discord.com/invite/tWSaeJ7mrd

fabse-hack commented 11 months ago

@fabse-hack I've got to get to work now, but I'll jump in and hit you at some point :) what's the server url?

https://github.com/drakxtwo/vl53l1x_pico you have an VL53L1X sensor ....

fabse-hack commented 10 months ago

@tobz-nz something new? maybe you can close the issue?

tobz-nz commented 10 months ago

@fabse-hack Just haven't had time to get to it. I mean .. the issue is not resolved so...🤷‍♂️