Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
pentac
 
Posts: 2
Joined: Wed Nov 28, 2012 6:36 am

Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Post by pentac »

I bought the Adafruit 16-Channel 12-bit PWM/Servo Driver (from floris.cc) after reading the great tutorial:
http://learn.adafruit.com/adafruit-16-c ... spberry-pi
from Kevin Townsend.

I assembled en connected the servo breakout to my Raspberry Pi as described.
Everything looks OK, "sudo i2cdetect -y 0" returns output as expected and described in the tutorial.

Output i2cdetect after boot Pi:

Code: Select all

$ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
But running the Servo_Example.py python script results in errors:
  • Error accessing 0x40: Check your I2C address
Output i2cdetect after running Servo_Example.py

Code: Select all

$ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 71 72 -- 74 -- -- --
I double checked the board for shortages but it looks OK.
Does anyone have an idea what could be wrong?

Thanks

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Post by adafruit »

try removing any other i2c devices, and also check your wiring that the power is good to the chip

pentac
 
Posts: 2
Joined: Wed Nov 28, 2012 6:36 am

Re: Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Post by pentac »

Thanks for the tip.
Found one bad ground connection on the bread board which caused the problem.
Now I can continue with the project. :D

Thanks

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”