Issue #099 [New/open] - Module MCP4725 Not Implemented

Posted by SergeantBurned

What steps will reproduce the problem?

  1. from webiopi.devices.analog import MCP4725
  2. Failed.

WebIOPi version used? => 0.7

Python version used? => 2.7.3

Distro used? (WebIOPi has only been tested on Raspbian Wheezy) => Rasbian Wheezy

Raspberry Pi board revision? (1 or 2) => 2

For Javascript side bugs, Browser? => N/A

Please provide any additional information below.

Worked in 0.6 fine. Updated to 0.7, Does not find the module for MCP4725.

Comment 1

Posted by andreas.riegg

Just change it to "from webiopi.devices.analog.mcp4725 import MCP4725".

In 0.6.0 the modules automatically imported ALL device classes, this was changed in 0.7.0 to save space. As downside you must now put a longer and exact module path to the import statements.

For the ADS1115, this would be then "from webiopi.devices.analog.ads1x1x import ADS1115".

This applies to ALL device driver classes. Sorry for the inconvenience, most Python examples on the Wiki pages still need to be updated to reflect this change ...

Hope this helps.