firmata / firmata.js

JavaScript implementation of the Firmata protocol
711 stars 147 forks source link

refactor to move features like i2c, serial, etc to separate modules #168

Open soundanalogous opened 7 years ago

soundanalogous commented 7 years ago

firmata.js is starting to get too big to easily manage. I think we should break out some of the features into separate modules. Initial candidates are things like I2C, Serial and the SPI support I'm working on.

soundanalogous commented 7 years ago

I'm not sure yet how this would impact upstream applications like johnny-five or other projects that depend on firmata.js. Maybe the firmata.js module could simply imports the required modules kinda like johnny-five.js does. Those modules could be:

firmata-core.js (digital and analog I/O, transport, etc) firmata-servo.js firmata-stepper.js firmata-i2c.js firmata-serial.js firmata-spi.js firmata-onewire.js etc