adafruit / Adafruit_BLE_PinIO

Modified Firmata code to work with Adafruit's Bluefruit LE Modules
https://learn.adafruit.com/bluefruit-le-connect-for-ios/
GNU Lesser General Public License v2.1
24 stars 15 forks source link

Fix CAPABILITY_RESPONSE, PIN_STATE_RESPONSE, ANALOG_MAPPING_RESPONSE #5

Open bbx10 opened 9 years ago

bbx10 commented 9 years ago

The responses were being written to Serial instead of BLEserial. Buffered write to BLE serial added for SYSEX reponses since they are long. Excessive 1-byte writes results in ACI 91 errors.

The changes have been tested using node.js firmata and johnny-five. The node.js nRF8001 driver is still pending a pull request so is not publicly available. I hope this will be resolved in the next few days.

soundanalogous commented 8 years ago

I would like to try to incorporate nrF8001 support for the version of StandardFirmataBLE I have in the works here. This is part of the Firmata distro so it will remain up-to-date with the bug fixes and new features added to Firmata. Support will be added by adding a bleConfig.h file that the user will need to modify if using an NRF8001 based board. That will then set up conditional compilation of the necessary libraries (which the user will need to have installed separately).

The buffering issue can also be addressed by creating a separate BLE stream class like this: https://github.com/firmata/arduino/blob/ble/utility/BLEStream.cpp. Probably need a separate stream for each driver or could be another layer of abstraction or #ifdefs within the Stream class to sort out bindings to the appropriate libraries.

ladyada commented 8 years ago

heya so...im doing a ton of hacking on this library right now. mostly i wanted to do a refactor to make it easy to adjust which pins are usable. but..what would your 'server' be for the firmata client to talk to? we have the bluefruit app...is there another thing?