Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue to run code getting PCF8591 says no module #1

Open
mkowndinya opened this issue Aug 21, 2016 · 10 comments
Open

Issue to run code getting PCF8591 says no module #1

mkowndinya opened this issue Aug 21, 2016 · 10 comments

Comments

@mkowndinya
Copy link

import PCF8591 as ADC
ImportError: No module named PCF8591

@sunfounder
Copy link
Collaborator

@mkowndinya That's weird, which directory did you run the code on?

@hijackindie
Copy link

I have a similar problem working with the sensor kit and a raspberry pi 3 running kernel 4.4.38-v7+.
Traceback (most recent call last):
File "13_pcf8591.py", line 2, in
import PCF8591 as ADC
File "/home/pi/SunFounder_SensorKit_for_RPi2/Python/PCF8591.py", line 23, in
bus = smbus.SMBus(1)
IOError: [Errno 2] No such file or directory

@hijackindie
Copy link

I got this working. I needed to enable I2C on the PI using raspi-config.

@sunfounder
Copy link
Collaborator

Yes, you need to enable I2C first, if you have any problems, welcome to post it on our forum: https://www.sunfounder.com/forum, or email us: [email protected] or of course, open an issue here.

@hemalparikh123
Copy link

im getting an error
line 44 in PCF8951.py
return bus.read_byte(address)

what could i do to fix this?

@yosefgadban
Copy link

I got this working. I needed to enable I2C on the PI using raspi-config.

I have a similar problem and i enabled I2C . still the same error

@SamGosselin
Copy link

Also having this issue. Code listed below:
Traceback (most recent call last): File "18_thermistor.py", line 2, in <module> import PCF8591 as ADC File "/home/pi/SunFounder_SensorKit_for_RPi2/Python/PCF8591.py", line 23, in <module> bus = smbus.SMBus(1) IOError: [Errno 2] No such file or directory

If anyone knows a fix I would greatly appreciate a link or simple command. Thanks.

@LuisValverde1296
Copy link

I'm also having troubles with this import, already enabled I2C and tried some other stuff I saw on different sources and still don't have a possitive result. If anyone has a propper fix please answer to my prayers. Thanks

@elijah247
Copy link

i am having the same problem, someone please answer!

@mschulz67
Copy link

If you're toying around with the sunfounder sensor kit: There's a file PCF8591.py (https://github.com/sunfounder/SunFounder_SensorKit_for_RPi2/blob/master/Python/PCF8591.py) that must be in the same directory as the executing script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants