I'm trying to do the raspberry pi guitar project from the raspberry pi made simple magazine. When I try to run guitar.py, I get this error code:
pi@raspberrypi:~/Adafruit_Python_MPR121/LXF_BananaGuitar $ ./guitar.py
chmod: cannot access ‘/sys/module/i2c_bcm2708/parameters/combined’: No such file or directory
Traceback (most recent call last):
File "./guitar.py", line 38, in <module>
if not cap.begin():
File "build/bdist.linux-armv7l/egg/Adafruit_MPR121/MPR121.py", line 90, in begin
File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 81, in require_repeated_start
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'chmod 666 /sys/module/i2c_bcm2708/parameters/combined' returned non-zero exit status 1
Any help would be appreciated.
-
- Posts: 2
- Joined: Wed Feb 17, 2016 8:03 pm
Re: cannot access ‘/sys/module/i2c_bcm2708/
It may be because the i2c modules have not been loaded. Try running:
sudo modprobe i2c_bcm2708
and then re-run your application and see if it now works.
sudo modprobe i2c_bcm2708
and then re-run your application and see if it now works.
FREE book on Raspberry Pi usage and programming
https://leanpub.com/pi
https://leanpub.com/pi
-
- Posts: 2
- Joined: Wed Feb 17, 2016 8:03 pm
Re: cannot access ‘/sys/module/i2c_bcm2708/
Thank you for the reply!
I followed your instructions and got this new error message:
pi@raspberrypi:~/Adafruit_Python_MPR121/LXF_BananaGuitar $ sudo modprobe i2c_bcm2708
pi@raspberrypi:~/Adafruit_Python_MPR121/LXF_BananaGuitar $ ./guitar.py
chmod: changing permissions of ‘/sys/module/i2c_bcm2708/parameters/combined’: Operation not permitted
Traceback (most recent call last):
File "./guitar.py", line 38, in <module>
if not cap.begin():
File "build/bdist.linux-armv7l/egg/Adafruit_MPR121/MPR121.py", line 90, in begin
File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 81, in require_repeated_start
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'chmod 666 /sys/module/i2c_bcm2708/parameters/combined' returned non-zero exit status 1
Is it possible I need to change to an admin user? If so, how would I do that?
I followed your instructions and got this new error message:
pi@raspberrypi:~/Adafruit_Python_MPR121/LXF_BananaGuitar $ sudo modprobe i2c_bcm2708
pi@raspberrypi:~/Adafruit_Python_MPR121/LXF_BananaGuitar $ ./guitar.py
chmod: changing permissions of ‘/sys/module/i2c_bcm2708/parameters/combined’: Operation not permitted
Traceback (most recent call last):
File "./guitar.py", line 38, in <module>
if not cap.begin():
File "build/bdist.linux-armv7l/egg/Adafruit_MPR121/MPR121.py", line 90, in begin
File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 81, in require_repeated_start
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'chmod 666 /sys/module/i2c_bcm2708/parameters/combined' returned non-zero exit status 1
Is it possible I need to change to an admin user? If so, how would I do that?