Dear all,
Have anyone tried this build? I'm using Raspi 2 using the I2C connection.
The I2C bus seems to be working correctly, but I wanted to read the data from the 4010 sensors.
pi@raspi2 ~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
I'm not sure if I had to see the 2 multiplexed 4010 or just the mux (0x70).
Anyone have a Python script for that? I just found one for Arduino.
Thanks!
Connect 2x VNCL4010 with the TCA9548A. Need a helpful hand.
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
The TCA9548 defaults to having all the multiplexed connections shut off. You'll need to set its internal switches before you get a response from a specific VNCL4010.
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Hi Mike,
I understand what you said, but not sure how to setup this. I Attached an image of the connections I've done. I'm probably missing a connection, or this reset is done via software?
Best regads,
Arbru
I understand what you said, but not sure how to setup this. I Attached an image of the connections I've done. I'm probably missing a connection, or this reset is done via software?
Best regads,
Arbru
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Send the TCA9548 a command packet telling it to use channel 1, then try running i2cdetect again.
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Hi Mike,
I'm not much confident I understood what you want me to do.
I'm not much confident I understood what you want me to do.
Code: Select all
pi@raspi2 ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_I2C $ sudo i2cset -y 1 0x70 0x00 0x02
pi@raspi2 ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_I2C $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Hi Mike,
Reading TI docs for the TCA9548A, it says I should be connecting the RST to the 5V via a resistor (like a 10k) and ground A0, A1 and A2.
Perhaps my setup is not correct?
Reading TI docs for the TCA9548A, it says I should be connecting the RST to the 5V via a resistor (like a 10k) and ground A0, A1 and A2.
Perhaps my setup is not correct?
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
You've done it correctly. The second run of i2cdetect shows a device responding to address 0x13, and that's the VNCL4010's address.
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Hi Mike,
Does anyone have ported the library on github from C to Python? I'm not really understanding how to read the value from the sensors, and where to get them, as they use different registers.
Does anyone have ported the library on github from C to Python? I'm not really understanding how to read the value from the sensors, and where to get them, as they use different registers.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
I don't know of any Python libraries for the VNCL4010.
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Hi Mike,
So how can I get the results from the sensor? Can you give me some advice?
I'm not quite sure where to read the data from. I'm interested on the proximity sensor data.
So how can I get the results from the sensor? Can you give me some advice?
Code: Select all
pi@raspi2 ~ $ sudo i2cget -y 1 0x13 0x85 w
0x0000
pi@raspi2 ~ $ sudo i2cget -y 1 0x13 0x81 w
0x0021
pi@raspi2 ~ $ sudo i2cget -y 1 0x13 0x82 w
0x0200
pi@raspi2 ~ $ sudo i2cget -y 1 0x13 0x83 w
0x1d02
pi@raspi2 ~ $ sudo i2cget -y 1 0x13 0x84 w
0x001d
- Arbru
- Posts: 12
- Joined: Wed Nov 25, 2015 2:44 pm
Re: Connect 2x VNCL4010 with the TCA9548A. Need a helpful ha
Hi Mike,
As you've noticed, I'm quite new to this. I was reading the Vishay documentation. They have some examples on the Register Settings. But I'm not sure how to get the data I need from the proximity sensor, as written on page 17.
As you've noticed, I'm quite new to this. I was reading the Vishay documentation. They have some examples on the Register Settings. But I'm not sure how to get the data I need from the proximity sensor, as written on page 17.
Please be positive and constructive with your questions and comments.