I made sure Adafruit_MCP230xx.py and Adafruit_I2C.py are in the same folder as my MCP23017wm.py folder.
I'm using the WebIDE as well
- Code: Select all
#! /usr/bin/python
from Adafruit_I2C import Adafruit_I2C
from Adafruit_MCP230xx import Adafruit_MCP230xx
import smbus
mcp = Adafruit_MCP230xx(busnum = 1, address = 0x20, num_gpios = 16)
mcp.config(0, OUTPUT)
mcp.config(1, OUTPUT)
mcp.config(8, OUTPUT)
mcp.config(9, OUTPUT)
mcp.output(0, 1)
mpc.output(1, 1)
mcp.output(8, 1)
mcp.output(9, 1)
I get the following error:
Traceback (most recent call last):
file "MCP23017wm.py", Line 4, in <module>
from Adafruit_MCP230xx import Adafruit_MCP230xx
ImportError: cannot import name Adafruit_MCP230xx
not sure why...
as indicated above both Adafruit_MCP230xx.py and Adafruit_I2C.py are in the folder with my MCP23017wm.py file...
using an Adafruit PiPlate
any help appreciated

