xtile / BH1750-Python

BH1750 for Orange Pi Zero ( via smbus )
1 stars 0 forks source link

bus = smbus.SMBus(1) FileNotFoundError: [Errno 2] No such file or directory #1

Open imihassan opened 2 years ago

imihassan commented 2 years ago

Hi,

I am having a problem. When I import smbus it is properly importing but with creating object of smbus it gives this error.

bus = smbus.SMBus(1) FileNotFoundError: [Errno 2] No such file or directory

What can be the problem

Assikurt94 commented 2 years ago

Hi,

I had a similar issue using a Raspberry Pi 3B. The solution for me was, that you have to enable I2C under Raspberry Pi Config>Intrfaces.

duxngsi commented 1 year ago

@Assikurt94 solved my problem. Thanks!