Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reading i2c sensors #42

Open
adrianardu opened this issue Dec 9, 2015 · 0 comments
Open

reading i2c sensors #42

adrianardu opened this issue Dec 9, 2015 · 0 comments

Comments

@adrianardu
Copy link

Hi,
I need some help. I want to read sensor values from a I2C sensor.
I think I need the sysex commands. I tried this:

arduino.pinMode(3, firmata.PIN_MODE_I2C);
arduino.pinMode(2, firmata.PIN_MODE_I2C);
console.log("I2C activated");
arduino.sysex('I2C_CONFIG');
arduino.sysex('I2C_REQUEST, [0x58, 'I2C_READ'], function(x){
arduino.on('sysex', function(e){
console.log("Data: ", e.command);
console.log("data : " + JSON.stringify(e.data));
});

It is not working and I have no idea how to realise the reading.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant