I just got my Raspberry and am using Occidentalis 0.2 When I run the check of my i2c bus nothing shows up--that is I get all zeros in the grid. Furthmore when I run the servo test program it keeps telling me no i2c bus address found.
Any idea what might be done to fix this?
Thanks
No i2c bus recognized
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/
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/
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
Let me give a little more background on my issue. I am using the Cobbler board and ribbon cable. The GPIO pins work just fine--I've been able to get 7 leds lighting up. The problem is the i2c bus. I'm getting nothing.
thanks for any help
thanks for any help
-
- Posts: 26
- Joined: Sun Feb 12, 2012 12:17 pm
Re: No i2c bus recognized
Specifically what i2c device have you connected to the bus?
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
I have a servo motor connected via the cobbler port. I get no sign of an i2c bus when it is either connected or not connected.
Thanks
Thanks
-
- Posts: 26
- Joined: Sun Feb 12, 2012 12:17 pm
Re: No i2c bus recognized
The servo by itself is not an i2c device. However if connected to the adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface it will then show up in the list.
https://www.adafruit.com/products/815
https://www.adafruit.com/products/815
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
I am confused, then. I am following both the tutorial for driving a servo (Raspberry tutorial #8), as well as a guide for installing the i2c kernel. Both imply you should see the i2c interface when running i2cdetect whether or not anything else is connected to the raspberry. Tutorial #8 also does not require the PWM/Servo driver chip.
Am I misunderstanding something?
Am I misunderstanding something?
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
A little more information: IN the tutorial on using the PWM/Servo module it states that: "All the files can be found in the directory /sys/class/rpi-pwm/pwm0/ on your Raspberry Pi." This is from the Occidentalis distro. On my installation of Occidentalis, this directory does not exist. Is the tutorial out of date, or is there something wrong with my installation?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: No i2c bus recognized
First of all, ennbr is correct. Tutorial #8 doers not use I2C to drive the servo -instead, a PWM output of the Pi is used. The tutorial refers to the Adafruit 16-Channel Servo/PWM Breakout Board tutorial for driving more than one servo. That board is an I2C device.pauln34 wrote:I am confused, then. I am following both the tutorial for driving a servo (Raspberry tutorial #8), as well as a guide for installing the i2c kernel. Both imply you should see the i2c interface when running i2cdetect whether or not anything else is connected to the raspberry. Tutorial #8 also does not require the PWM/Servo driver chip.
Am I misunderstanding something?
So, the servo alone won't show up on the I2c bus, and you should not be trying to use any I2C code to drive it. Instead, use the code found on the 'Software' page of Tutorial #8
Have you looked at Adafruit's tutorial for configuring I2C on the Pi? You may be looking for the wrong I2C bus. The 512MB Model B uses I2C bus 1. The command for inspecting that is
Code: Select all
sudo i2cdetect -y 1
Code: Select all
sudo i2cdetect -y 0
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
Thanks. I was using the software from tutorial 8, and following all of the wiring diagrams.
When I run the program, what I get is lots of lines of:
Error writing to: servo value: 63
Error writing to: delayed value: 0
Error writing to: mode value: servo
Error writing to: servo_max value: 180
Error writing to: active value: 1
I notice the program has the following call:
open("/sys/class/rpi-pwm/pwm0/" + property, 'w')
But my system does not seem to have the rip-pwm class in its class directory. is there something wrong with the code? Is the rpi-pwm class some other place?
When I run the program, what I get is lots of lines of:
Error writing to: servo value: 63
Error writing to: delayed value: 0
Error writing to: mode value: servo
Error writing to: servo_max value: 180
Error writing to: active value: 1
I notice the program has the following call:
open("/sys/class/rpi-pwm/pwm0/" + property, 'w')
But my system does not seem to have the rip-pwm class in its class directory. is there something wrong with the code? Is the rpi-pwm class some other place?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: No i2c bus recognized
Hi - I just did a clean install of occidentalis 0.2, and "/sys/class/rpi-pwm/pwm0/" is there. It's the only thing in the rpi-pwm directory. Do you see the "/sys/class/rpi-pwm" directory?
The file "/sys/class/rpi-pwm/pwm0" itself is a softlink to "/sys/devices/platform/rpi-pwm/pwm0". Do you see that path on your pi?
The file "/sys/class/rpi-pwm/pwm0" itself is a softlink to "/sys/devices/platform/rpi-pwm/pwm0". Do you see that path on your pi?
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
Strangely enough, it is not there. I just downloaded Occidentalis a few days ago. What might I have done to not have those directories in my system?
Thanks
Thanks
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: No i2c bus recognized
did you do an apt-get upgrade or apt-get update? because that would overwrite the kernel
- pauln34
- Posts: 10
- Joined: Fri Jan 25, 2013 8:13 pm
Re: No i2c bus recognized
I did do apt-get update and upgrade, as recommended. Would this delete the rpi-pwm folder? Why would it do that?
Any thoughts on how to reinstall (or where to find the code to reinstall), the rpi-pwm stuff?
Thanks
Any thoughts on how to reinstall (or where to find the code to reinstall), the rpi-pwm stuff?
Thanks
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: No i2c bus recognized
Actually, the tutorial only recommends "update", not "upgrade". Update will only get new versions of installed software, but "upgrade" will overwrite the kernel with a new version of linux. I'm guessing here, but you probably wound up overwriting occidentalis with raspbian.
Occidentalis is Adafruits version of Raspbian configured for hardware support. I believe the PWM support is an occidentalis thing, and not part of raspbian.
I'm afraid you're going to have to start over and re-install occidentalis.
Occidentalis is Adafruits version of Raspbian configured for hardware support. I believe the PWM support is an occidentalis thing, and not part of raspbian.
I'm afraid you're going to have to start over and re-install occidentalis.
- walleee
- Posts: 1
- Joined: Mon Jun 20, 2011 2:59 am
Re: No i2c bus recognized
That seems to lead to some inconsistencies - when my RPi starter kit came in a couple weeks ago I installed Occidentalis v0.2 on the card. I noticed the RPi was only recognizing 256 MB of RAM instead of 512, so I emailed support asking if there was a problem with it. Phil responded with a couple of links to the RPi forums on the memory issue, and those links indicated the solution was to Update/Upgrade. I did that, and all 512 MB were recognized. I have not tried using I2C or PWM yet so I don't know what would happen there.I'm afraid you're going to have to start over and re-install occidentalis.
At least in my case, reinstalling Occidentalis v0.2 would cause the RPi to no longer recognize half of the installed RAM.
The links Phil sent me:
http://www.raspberrypi.org/phpBB3/viewt ... 63&t=20255
http://www.raspberrypi.org/phpBB3/viewt ... 28&t=24411
Wally
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/
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/