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.
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 :)
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.
@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:
Thanks, I'll dig in and see if I can figure something out!
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
Sounds like fun :)
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 ?
Yes, all classes will be migrating to the new API in time