Closed Armin46 closed 2 years ago
None of the error messages that you are seeing when installing are related to mcp-spi-adc. None of the packages that are being complained about are used by mcp-spi-adc. The error messages that you are seeing when installing must be related to other packages that you are using in your application.
Here is what I see when I install mcp-spi-adc in an empty directory:
pi@raspberrypi:~/mcp-spi-adc $ npm install mcp-spi-adc
added 6 packages, and audited 7 packages in 23s
found 0 vulnerabilities
pi@raspberrypi:~/mcp-spi-adc $
I am not familiar with IoBroker and can help you debug your application when using IoBroker.
Ok Thank you for the quick answer
I'll go ahead and close this as there is no TODO for mcp-spi-adc.
Hello i get the Error Message
`
npm fund
for details`
And when i try this Script the javascript Instanz crash in IoBroker
`createState('Analogmodul.Channel0',0,read1); createState('Analogmodul.Channel1',0,read2); createState('Analogmodul.Channel2',0,read3); createState('Analogmodul.Channel3',0,read4);
const mcpadc = require('mcp-spi-adc');
function read1(){ const input1 = mcpadc.openMcp3204(0, {busNumber: busNumber, deviceNumber:deviceNumber, speedHz: 20000}, (err) => { if (err) throw err;
setInterval(() => { input1.read((err, reading) => { if (err) throw err;
}, Interval); }); }
function read2(){ const input2 = mcpadc.openMcp3204(1, {busNumber: busNumber, deviceNumber:deviceNumber, speedHz: 20000}, (err) => { if (err) throw err;
setInterval(() => { input2.read((err, reading) => { if (err) throw err;
}, Interval); }); }
function read3(){ const input3 = mcpadc.openMcp3204(2, {busNumber: busNumber, deviceNumber:deviceNumber, speedHz: 20000}, (err) => { if (err) throw err;
setInterval(() => { input3.read((err, reading) => { if (err) throw err;
}, Interval); }); }
function read4(){ const input4 = mcpadc.openMcp3204(3, {busNumber: busNumber, deviceNumber:deviceNumber, speedHz: 20000}, (err) => { if (err) throw err;`
Has someone an Idea?
Thanks in advance