joule-code-samples icon indicating copy to clipboard operation
joule-code-samples copied to clipboard

Samples with python and ubuntu

Open ihabZhaika opened this issue 9 years ago • 6 comments

hi, i have installed ubuntu on the joule , and i tried to connect i2c devices ,but it unable to detect any thing More details : i am running on ubuntu 16.04 , i installed the I2C libs with the following lines sudo apt-get install python-smbus sudo apt-get install i2c-tools

then i used the following line to check I2C0 [pin 11 , pin 13] devices ,but i was not able to find the device [ PCA9685 16 Channel adafruit servo controller] [ i tired it with up-board ] and it detected sudo i2cdetect -y 0 i got , which not the device address

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

i tired to connect it to buses 1,2,3 and no addresses at all sudo i2cdetect -y 1 sudo i2cdetect -y 2 sudo i2cdetect -y 3 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

So is there any kernel patch needed and what to do for getting them working ?

ihabZhaika avatar Nov 03 '16 22:11 ihabZhaika

Hi, add pull-up resistors to the SDA and SCL lines, 4.7KΩ should do nicely.

Propanu avatar Nov 03 '16 22:11 Propanu

@Propanu THe pull-up resistor will connected to the ground and to the pin correct ? if you can provide little scheame will be great help i will try it and update the post

ihabZhaika avatar Nov 08 '16 20:11 ihabZhaika

@ihabZhaika, they go in between the pin and VCC. You'll have to do it for both SDA and SCL, here's an example: Pull-up Resistors

Propanu avatar Nov 08 '16 20:11 Propanu

hi, i tried , but still no thing appear i am using IMU MPU6050 i connected the gnd and the vcc then added the pull-up resistors as you said to the SDA,SCL but still did not detect it

ihabZhaika avatar Nov 09 '16 07:11 ihabZhaika

any other suggestion ?

ihabZhaika avatar Nov 14 '16 22:11 ihabZhaika

@ihabZhaika Have you checked the MRAA version, and updated it to the newest one? Also, make sure the ground and +V pins you're using are on the same side of the Joule module. As close together as possible. Try changing ground pins, if they already are. We've had issues with grounds not all being equal.

bqcrabtree avatar Nov 15 '16 19:11 bqcrabtree