mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Add 3201 to mc3008 node.
This commit is contained in:
parent
b44676ef3c
commit
9b2ba970de
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-pi-mcp3008",
|
||||
"version" : "0.3.0",
|
||||
"version" : "0.4.0",
|
||||
"description" : "A Node-RED node to read from the MCP3008 Analogue to Digital Converter",
|
||||
"dependencies" : {
|
||||
"mcp-spi-adc": "^3.1.0"
|
||||
"mcp-spi-adc": "^3.2.0"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
|
@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<script type="text/x-red" data-template-name="pimcp3008">
|
||||
<script type="text/html" data-template-name="pimcp3008">
|
||||
<div class="form-row">
|
||||
<label for="node-input-dev"><i class="fa fa-server"></i> Device</label>
|
||||
<select type="text" id="node-input-dev" style="width:150px;">
|
||||
<option value="3008">mcp3008</option>
|
||||
<option value="3002">mcp3002</option>
|
||||
<option value="3004">mcp3004</option>
|
||||
<option value="3201">mcp3201</option>
|
||||
<option value="3202">mcp3202</option>
|
||||
<option value="3204">mcp3204</option>
|
||||
<option value="3208">mcp3208</option>
|
||||
@ -46,7 +47,7 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="pimcp3008">
|
||||
<script type="text/html" data-help-name="pimcp3008">
|
||||
<p>Reads from an MCP3xxx Series Analogue to Digital Converter (ADC) chip on the Pi SPI CE0 or CE1 connection,
|
||||
such as the rasp.io/analogzero.</p>
|
||||
<p>You can either set a channel in the edit dialogue, or you can set the <code>msg.payload</code>
|
||||
|
@ -41,6 +41,7 @@ module.exports = function(RED) {
|
||||
if (node.dev === "3002") { mcp3xxx.push(mcpadc.openMcp3002(i, opt, cb)); }
|
||||
if (node.dev === "3004") { mcp3xxx.push(mcpadc.openMcp3004(i, opt, cb)); }
|
||||
if (node.dev === "3008") { mcp3xxx.push(mcpadc.openMcp3008(i, opt, cb)); }
|
||||
if (node.dev === "3201") { mcp3xxx.push(mcpadc.openMcp3201(i, opt, cb)); }
|
||||
if (node.dev === "3202") { mcp3xxx.push(mcpadc.openMcp3202(i, opt, cb)); }
|
||||
if (node.dev === "3204") { mcp3xxx.push(mcpadc.openMcp3204(i, opt, cb)); }
|
||||
if (node.dev === "3208") { mcp3xxx.push(mcpadc.openMcp3208(i, opt, cb)); }
|
||||
|
Loading…
Reference in New Issue
Block a user