Library for talking to MCP342x converters using I2C.
Those devices are configured using a single byte and the input voltage is read directly.
Parameters used throughout this library are :
::channel Up to 4 channels, from 1 to 4, are available depending on the model.
::converting? When writing the configuration byte, this parameter must be set to true for initiating a new measure in :one-shot mode. It does not matter in :continuous mode. When reading the input voltage, the converter sets this parameter to false when a new conversion is ready.
::mode In :continuous mode, the converter measures the input voltage constantly whereas in :one-shot mode, the measure only happens when the master writes a configuration byte with ::converting? set to true.
::pga Programamble Gain Amplifier. #{:x1 :x2 :x4 :x8}
::resolution Number of bits the input voltage is represented by, depending on the model. #{:12-bit :14-bit :16-bit :18-bit}
IO operations will throw in case of failure and are performed using this library :
Library for talking to MCP342x converters using I2C. Those devices are configured using a single byte and the input voltage is read directly. Parameters used throughout this library are : ::channel Up to 4 channels, from 1 to 4, are available depending on the model. ::converting? When writing the configuration byte, this parameter must be set to true for initiating a new measure in :one-shot mode. It does not matter in :continuous mode. When reading the input voltage, the converter sets this parameter to false when a new conversion is ready. ::mode In :continuous mode, the converter measures the input voltage constantly whereas in :one-shot mode, the measure only happens when the master writes a configuration byte with ::converting? set to true. ::pga Programamble Gain Amplifier. #{:x1 :x2 :x4 :x8} ::resolution Number of bits the input voltage is represented by, depending on the model. #{:12-bit :14-bit :16-bit :18-bit} IO operations will throw in case of failure and are performed using this library : https://github.com/dvlopt/linux.i2c.clj
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close