kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Hang on wire.stream Reading MCP3424 A/D Converter #14

Open ghost opened 11 years ago

ghost commented 11 years ago

Mentioned in above post but thought that I would post as it's own issue. The below code...

    var i2c = require('i2c');       
    var wire = new i2c(0x6A, {device: '/dev/i2c-1', debug: false}); 
    wire.on('data', function(data) {
        console.log(data);
    });
    console.log("wire.stream**************************");
    wire.stream(0x90, 4, 5000); 
    console.log("wire.stream**************************");

...never returns from the wire.stream command. The data event is triggered so things are working in the background. Other events (not shown in this example), such as an incoming socket message, are not handled.

The above test was run on a BeagleBone Black on a clean new O/S installed from the 09-07 Angstrom image.

rzr commented 3 years ago

Is this issue still relevant on latest @abandonware's fork ?

https://libraries.io/npm/@abandonware%2Fi2c/usage

Relate-to: https://github.com/kelly/node-i2c/issues/97