Hi, total electronics noob here. Am slowly teaching myself the basics but current project dictates that i must run before I can walk!
I have 4 proximity sensors (VCNL4010) that can be controlled using I2C. However, they are have the same address and the address cannot be changed. The Pi only has 1 (maybe 2?) I2C so I need a way to cycle through each sensor and read it.
Software is my thing so i can write the code needed to get the job done; what I'm stuck on is the best way to connect the hardware. Initial investigations point to using 4 transistors to control the current getting to each sensor so that only 1 is alive at any one time. Does that sound right? Is there a neater way to do it?
I currently have an ExplorerHat Pro sat on top of the Pi. I've done this because it gives me a nice way to control 2 motors and also neatly labelled pins for the I2C stuff.
Any advice appreciated!
I have 4 proximity sensors (VCNL4010) that can be controlled using I2C. However, they are have the same address and the address cannot be changed. The Pi only has 1 (maybe 2?) I2C so I need a way to cycle through each sensor and read it.
Software is my thing so i can write the code needed to get the job done; what I'm stuck on is the best way to connect the hardware. Initial investigations point to using 4 transistors to control the current getting to each sensor so that only 1 is alive at any one time. Does that sound right? Is there a neater way to do it?
I currently have an ExplorerHat Pro sat on top of the Pi. I've done this because it gives me a nice way to control 2 motors and also neatly labelled pins for the I2C stuff.
Any advice appreciated!
Last edited: