adafruit / Adafruit_CircuitPython_EMC2101

CircuitPython driver for EMC2101 brushless fan controller
MIT License
3 stars 9 forks source link

Using this library on GENERIC_LINUX_PC with i2c adapter #33

Closed blauertee closed 10 months ago

blauertee commented 10 months ago

I'm trying to configure my EMC2101 from my Linux PC with a cheap usb to i2c adapter. When cloning this repository and executing the example from the README I get

Traceback (most recent call last):
  File "/home/jakob/MyProjects/Silke Lampe/emc2101_conf.py", line 7, in <module>
    i2c = board.I2C()  # uses board.SCL and board.SDA
AttributeError: module 'board' has no attribute 'I2C'

How can I tell the library that I have an i2c adapter on my pc? Or is there a way to use smbus instead of busio?

blauertee commented 10 months ago

Anyone else looking for something like this just uploaded my scipt here which might save you a few minutes: https://github.com/blauertee/smbus-emc2101-python/