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

Already on GitHub? Sign in to your account

I2C Capability #88

cooltrooper opened this Issue Nov 11, 2012 · 9 comments


None yet
4 participants

Add the ability for I2C communication. Probably would only allow low level communication as devices vary significantly in the commands and addresses required for use.


rwaldron commented Apr 14, 2013

This is built-in!

this.firmata.sendI2CWriteRequest( address, bytes );

this.firmata.sendI2CReadRequest( address, bytes, callback );

Let me know if this is what you were looking for—if not we can reopen for discussion :)

@rwaldron rwaldron closed this Apr 14, 2013

devth commented Feb 21, 2014

hey @rwaldron, is there anything for controlling an I2C LCD? Saw this discussion https://gist.github.com/haugstrup/3200331 from a few years ago but looks like it was not using I2C.


rwaldron commented Feb 21, 2014

@devth not yet, but patches welcome! The addition should follow the design pattern used here: https://github.com/rwaldron/johnny-five/blob/master/lib/sonar.js, specifically the Device object pattern. Take a look at how the exact same class is used, with the same API for both analog and I2C devices:

devth commented Feb 21, 2014

Thanks, I'll dig in and see if I can figure something out!


rwaldron commented Feb 21, 2014


Becareful, this will be a lot of work and will suck you in! Just ask @dtex, he spent nearly 2 months redesigning the Motor class—it's a work of art, with emphasis on work :D

devth commented Feb 21, 2014

Sounds like fun :)


rwaldron commented Jun 1, 2014

For any future readers, this.firmata has been moved to this.io

On https://github.com/jgautier/firmata#i2c it's indicated that sendI2CWriteRequest and sendI2CReadRequest functions are both deprecated. Is it also the case for johnny-five ?


rwaldron commented Mar 11, 2015

Yes, all classes will be migrating to the new API in time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment