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 :
:mcp342x/channel Up to 4 channels, from 1 to 4, are available depending on the model.
:mcp342x/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.
:mcp342x/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 :mcp342x/converting? set to true.
:mcp342x/pga Programamble Gain Amplifier. #{:x1 :x2 :x4 :x8}
:mcp342x/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 :
:mcp342x/channel
Up to 4 channels, from 1 to 4, are available depending on the model.
:mcp342x/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.
:mcp342x/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 :mcp342x/converting? set to true.
:mcp342x/pga
Programamble Gain Amplifier.
#{:x1 :x2 :x4 :x8}
:mcp342x/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/helins/linux.i2c.cljcljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |