Discussion:
[beagleboard] i2c-bus - A new Node.js I2C module
Brian Cooke
2014-12-23 10:08:48 UTC
Permalink
I've written a new Node.js module called i2c-bus for accessing I2C devices
on Linux boards like the BeagleBone Black.

It can be found here on github: https://github.com/fivdi/i2c-bus
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Cooke
2014-12-23 15:18:03 UTC
Permalink
Sure, here are a number of things that come to mind:

- All methods have asynchronous and synchronous forms (i2c has the
synchronous form although it looks like it has the asynchronous form)
- It offers more complete support for the SMBus protocols (quick
command, send byte, receive byte, write byte/word, read byte/word, I2C
block transaction (I2C block transaction are not part of the SMBus
specification))
- It supports plain I2C (see methods i2cRead, i2cReadSync, i2cWrite,
i2cWriteSync)
- It offers runtime information about the functionality supported by the
bus/adapter (like 'i2cdetect -F 1', see methods i2cFuncs and i2cFuncsSync,
see example
https://github.com/fivdi/i2c-bus/blob/master/example/i2cdetect.js)
- One i2c-bus object can handle multiple devices
- Because it supports the SMBus receive byte protocol (see methods
receiveByte and receiveByteSync) it's possible to scan for devices (like
'i2cdetect -y -r 1', see example
https://github.com/fivdi/i2c-bus/blob/master/example/i2cscan.js). This
resolves https://github.com/kelly/node-i2c/issues/27
- ...
Can you describe any advantages it has over node-i2c?
Post by Brian Cooke
I've written a new Node.js module called i2c-bus for accessing I2C
devices
Post by Brian Cooke
on Linux boards like the BeagleBone Black.
It can be found here on github: https://github.com/fivdi/i2c-bus
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups
Post by Brian Cooke
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Brian Cooke
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Cooke
2015-01-20 19:47:52 UTC
Permalink
There is one more thing:


- i2c-bus is io.js and Node.js compatible - tested with io.js 1.0.2 on a
BeagleBone Black running Ubuntu 14.04.1 LTS (GNU/Linux 3.14.26-ti-r43
armv7l)
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Andrew Snider
2015-01-22 16:05:08 UTC
Permalink
Thanks for this, I was looking at node-i2c & how to implement scan & went
all cross eyed.
Post by Brian Cooke
- i2c-bus is io.js and Node.js compatible - tested with io.js 1.0.2 on
a BeagleBone Black running Ubuntu 14.04.1 LTS (GNU/Linux 3.14.26-ti-r43
armv7l)
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Search results for '[beagleboard] i2c-bus - A new Node.js I2C module' (Questions and Answers)
7
replies
my computer does not shutdowns (WIN XP)?
started 2006-12-31 00:23:51 UTC
desktops
Loading...