Hello,
I want to use pins of the Hacker Port on the S3 robot to communicate with a laser module in I2C.
I’m wondering if using these pins (Hacker Port) for a i2c communication is possible? And if so, is there any examples of how to use the i2c functions?
thk
Comments
Check the schematic for the hacker port. If there are pull-ups to Vdd, then, yes, it's I2C-capable. If not, you will have to add a 4.7K pull-up on your chosen SDA line. If your slave device utilizes clock-stretching, you will also have to add a pull-up to SCL.
-Phil
Based on the schematic that should work just fine.
Looks like these pins are setup to be 5 Volt tolerant so they should work as an I2C input/output.
There are several projects that use I2C. Just need to know what you're talking too.
So P0 through P5 are available.
Mike
Do you have a Data Sheet for the laser module?
Thank you for all your answers!
The laser module is the VL53L1X.
I found this datasheet but there is no information about the i2c communication.
Official website : https://www.st.com/en/evaluation-tools/vl53l1x-satel.html#overview
Hi
see
https://www.st.com/resource/en/datasheet/vl53l1x.pdf
section 4 - Control interface
Sparkfun have a tutorial for the I2C interface -
https://learn.sparkfun.com/tutorials/i2c/all
nice bit of bit banging practice
The one commonly available on ebay
https://www.ebay.co.uk/itm/194560894520?epid=8039733192&hash=item2d4cbba638:g:FQgAAOSw5zVhp3Mh
will work to 3.3 or 5v and has pullup resistors
Have fun
Dave
This is a very interesting module.
It will take some work to get this to work with the P1. They do not document the registers used by the device but instead supply a driver to be used.
This driver is for the STM processors and would need to be changed to work with the P1. The driver files are in bare metal C code so it would be possible to convert this driver over to the P1.
It might be simpler to use the Parallax Laser Pin sensor.
Mike