Raspberry pi Pico with distance sensor VL53L1X

I am having problems running a VL53L1X on the Raspberry Pi Pico (via Window 10)

I keep getting the following:

I am able to load and run other programs on the Pico.
Is this likely to be a Windows issue with the I2C protocol?

Cheers
Aidan

3 Likes

Hi Aidan,

What an interesting issue, I’ve got my identical VL53L1X distance sensor running while also using the latest update of Windows 10 in one of my current projects.

https://raw.githubusercontent.com/CoreElectronics/CE-PiicoDev-Unified/main/PiicoDev_Unified.py

https://raw.githubusercontent.com/CoreElectronics/CE-PiicoDev-VL53L1X-MicroPython-Module/main/PiicoDev_VL53L1X.py

I’d suggest grabbing the latest version of each off the main branch from the Core Electronics Repo that I linked above. I don’t believe that there have been any PRs or commits to the main branch that would affect either of these files for over a month now, but that’d be your best first port of call.

By the way [Errno 5] literally just refers to an I/O error, you’ve said that you’ve been able to upload and run other scripts on the Pico successfully without issue. Without unplugging the board from your machine when you get this error can you please attempt to upload one of the other scripts to see whether you hit the same problem? I’m curious to see whether it is unique to this particular script.

Usually, I’d suspect that the COM port may be busy, although that usually throws some other pretty distinctive issues and wouldn’t allow you to upload anything else to the board normally.

2 Likes

Hi Bryce
Very much appreciate the prompt response!!

I’ll do some more playing on the weekend and get back to you.

Cheers
Aidan

1 Like

Hey Aidan,

Welcome to the forum :smiley:

I’d say its also worth deleting the original files and starting from scratch using the method Michael talks about in the tutorial.

1 Like

Hi Bryce
Thanks again for the quick response.
I now have it working and I’m almost too embarrassed to tell you how!!

I had the Pico on the Expansion board the wrong way round!!!

It’s a great device and I’m looking forward to playing with it.

Thanks again
Aidan

3 Likes

Hey Aidan,

No worries at all, thanks for sharing your outcome! Hopefully someone else reading this in future hitting that same error can double check their set up to make sure that’s not causing their issue. All the best with your project! Feel free to share how you’re using the VL53L1X I’m always curious to see where the boards Core puts together end up :grinning_face_with_smiling_eyes:

Enjoy your long weekend!