Uncategorized
1

I am trying to connect multiple Vl6180x sensors to my Raspberry Pi 3. The addresses of these sensors are 0x29 (unchangeable) so unless I use a mux, I have to set up multiple I2C busses. I followed the instructions detailed in this tutorial to do so, but when I run “sudo i2cdetect -y 3” it just checks the addresses really slowly and does not find anything on 0x29. Yes, I connected SDA to 23 and SCL to 24. Yes, I tested it on bus 1 and it worked. I am also using 2.2k pullup resistors on both sda and scl. I2C is not blacklisted and here is my config file:

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835) dtparam=audio=on
# --- added by adafruit-pitft-helper Wed Apr 24 16:27:14 HDT 2019 ---
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft28-resistive,rotate=90,speed=64000000,fps=30
# --- end adafruit-pitft-helper Wed Apr 24 16:27:14 HDT 2019 ---
enable_uart=1

dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=2,i2c_gpio_sda=23,i2c_gpio_scl=24

dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=2,i2c_gpio_sda=17,i2c_gpio_scl=27

Here is a picture of the sensor on i2c bus 1, and the address is properly detected:

enter image description here

enter image description here

And here is a picture of the sensor connected to my created i2c bus 3 (SDA=23, SCL=24):

enter image description here

So why isn’t this working?

 New contributor

This question has an open bounty worth +100 reputation from Murey Tasroc ending in 7 days.

This question has not received enough attention.

  • A clear photo of the wiring may help. – joan Apr 27 at 3:06
  • Added some photos, though I don’t think my wiring is off. – Murey Tasroc 2 days ago
  • The photo seems to show pins 14/16 being used rather than pins 16/18. – joan 2 days ago
  • Sorry, it was just a bad angle. It is actually pins 16/18 (I updated the photo to show this better). – Murey Tasroc 2 days ago
  • Use pinout.xyz to help identify the pins on your RPi. – Dougie 2 days ago
  • Dougie – thanks for the tip. I think my wiring checks out, as pinout.xyz lists pin 16 and 18 (the pins to which my device is connected) as GPIO 23 and 24 — the same pins that I2C bus 3 is supposed to be using. – Murey Tasroc yesterday

Your Answer

—-

 

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: