VL50L0X. i2c version
picaxe guys were asking for info so posted working proton basic code and man buzby changed it to picaxe basic and it worked.
I'm trying to change it to gcb but proton and picaxe are similar but gcb is totally different.
Forget the device, it's the translation.
If the device allows send multiple bytes or words how to recieve them.
There's i2c recieve in c++ that recieves bytes into an array to.
I've spent many hours on the spi version and now this i2c version.
I'm not digging out a picaxe board or using an arduino sketch.
Also add there's no info of registers just the manufacturers c++ api.
Last edit: stan cartwright 2018-05-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
VL50L0X looks interesting. I could have used one 4 years ago to figure bulk density in a drum of dry material.
I do not have a .pdf for the module. Flying blind. Brief look at arduino code looks like the address is 0x29 and if the read bit is attached ion the same way then 0x52 seems right for w_address.
Your first post sent the 0xc0 after the read request? need data sheet.
Code doesn't look like your problem. Check your hook ups.
Get a data sheet and read.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks. I've had one since last year and spent too much time looking at c code.
The first one I could find the i2c address but later couldn't. I bought a replacement and that has done the same.
The unbranded ones are cheap but don't seem reliable.
There are other laser range finders but ott for a simple robot project.
I got a few £1 red laser units and a £1 laser sensor to play with.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can any once picaxe users help me convert this picaxe code please?
hi2csetup I2CMASTER, $52, i2cfast, i2cbyte
hi2cin $C0,(b0)
I have
This is worse
hi2cin $14,(da1,da2,da3,da4,da5,da6,da7,da8,da9,da10,da11 ,da12)
I tried
It doesn't work. What is the translation please.
Last edit: stan cartwright 2018-05-16
be a lot easier ro read the datasheet. what is the device?
VL50L0X. i2c version
picaxe guys were asking for info so posted working proton basic code and man buzby changed it to picaxe basic and it worked.
I'm trying to change it to gcb but proton and picaxe are similar but gcb is totally different.
Forget the device, it's the translation.
If the device allows send multiple bytes or words how to recieve them.
There's i2c recieve in c++ that recieves bytes into an array to.
I've spent many hours on the spi version and now this i2c version.
I'm not digging out a picaxe board or using an arduino sketch.
Also add there's no info of registers just the manufacturers c++ api.
Last edit: stan cartwright 2018-05-16
I could adapt this bmp280 code but can't see where BME280Address is defined. It's not BME280_I2C_ADDRESS.
Look on line 52 of the BME280.h file
This was the default on all the little BME280 modules that i practiced on.
It does not get to first hserprint.
VL50L0X looks interesting. I could have used one 4 years ago to figure bulk density in a drum of dry material.
I do not have a .pdf for the module. Flying blind. Brief look at arduino code looks like the address is 0x29 and if the read bit is attached ion the same way then 0x52 seems right for w_address.
Your first post sent the 0xc0 after the read request? need data sheet.
Code doesn't look like your problem. Check your hook ups.
Get a data sheet and read.
There is an interesting thread here,,,, https://sourceforge.net/p/gcbasic/discussion/579126/thread/24fdc1ad/?limit=25
Stan. Do you have the datasheet?
The data sheet tells me nothing. There's a c and python api you're supposed to use. Not much info about registers. Some code where the author has gleaned info and link to more code which I'm trying to convert. http://www.protonbasic.co.uk/showthread.php/76045-VL53L0X-laser-ranging-sensor
Datasheets http://www.st.com/en/embedded-software/stsw-img005.html
Vendor Sourcecode attached.
This is very good. This explains APIs
Thanks. I've had one since last year and spent too much time looking at c code.
The first one I could find the i2c address but later couldn't. I bought a replacement and that has done the same.
The unbranded ones are cheap but don't seem reliable.
There are other laser range finders but ott for a simple robot project.
I got a few £1 red laser units and a £1 laser sensor to play with.