Open GoogleCodeExporter opened 9 years ago
Gian,
First, thanks for your contribution.
Three remarks:
1. It does not work from within WebIOPi custom script because WebIOPi uses the
Python package installation setup mechanism that precompiles all WebIOPi code
and puts it in a Python module library (using setup.py). When running WebIOPi
the standard way, this is done by using the module calling start of Python (see
webiopi.sh). The whole Adafruit stuff is just not in the precompiled library
and so the import fails. You could fix that by adding the Adafruit stuff, but
you will do this at your own "risk", we can't give you support if anything
fails or does not work stable.
2. The Adafruit stuff uses its own I2C bus access code (for the MCP23017 chip).
While this may work it could have unforseen interferences with the WebIOPi I2C
access code, so this is from my point of view a no-go as two libraries are
mixed together that were never (and will never) be intended to do so.
3. For good reasons, it is the official policy of WebIOPi to have no
dependencies on any 3rd party components or libraries. So the point 2 is a
violation of this rule.
So, you may be able to run this by modifying the package list, but this is a
very ugly solution. Better would be to use the existing WebIOPi I2C driver for
the MCP chip and rewrite the whole Adafruit stuff to use the mcp instance. This
is what Eric has done when implementing the PiFace shield driver, you may look
there. However, looking at the Adafruit code, there are many I2C calls in
there, some with maybe critical timing/polling so this won't be an easy 10
minutes task. Plus, writing a WebIOPi device driver needs additional skills ...
So at least you are informed what is the case.
Andreas
Original comment by andreas....@googlemail.com
on 7 May 2014 at 8:09
Hi, thanks a lot for your detailed answer. I'm a little bit sad about a quick
solution to my problem. This week I'll try to test if webiopi and Adafruit i2c
can run toghether. Not the best solution of course but if it works.... :-)
Otherwise I'll add a second pi to manage front-end interaction with lcds.
Original comment by gianec...@gmail.com
on 12 May 2014 at 10:20
[deleted comment]
If you cant import other libraries like smbus, than this webiopi isn't ready to
be realeased...
Original comment by JoeyPong...@gmail.com
on 25 Oct 2014 at 1:55
Original issue reported on code.google.com by
gianec...@gmail.com
on 6 May 2014 at 10:09Attachments: