The microchip_tech_mcp3428 module

Autogenerated API documentation for microchip_tech_mcp3428

Driver for Microchip Technology MCP3428 Analog Input device Calibrated to PR33-13 from ncd.io other products will use different voltage references.

class PyExpLabSys.drivers.microchip_tech_mcp3428.I2C(device, bus)[source]

File based i2c. Code adapted from: https://www.raspberrypi.org/forums/viewtopic.php?t=134997

__init__(device, bus)[source]
write(values)[source]

Write a value to i2c port

read(number_of_bytes)[source]

Read value from i2c port

close()[source]

Close the device

class PyExpLabSys.drivers.microchip_tech_mcp3428.MCP3428[source]

Bases: object

Class for reading voltage from MCP3428 For some reason this chip works only partly with smbus, hence the use of file based i2c.

__init__()[source]

x.__init__(…) initializes x; see help(type(x)) for signature

read_sample(channel=1, gain=1, resolution=12)[source]

Read a single sample

gain(gain=1)[source]

Return the command code to set gain

resolution(resolution=12)[source]

Return the command code to set resolution

channel(channel=1)[source]

Return the command code to set channel