sandeepmistry / arduino-BLEPeripheral

An Arduino library for creating custom BLE peripherals with Nordic Semiconductor's nRF8001 or nR51822.
MIT License
464 stars 180 forks source link

Add support for RBL nRF52832 boards #185

Closed sandeepmistry closed 7 years ago

sandeepmistry commented 7 years ago

As requested in #179.

For the Arduino Core: https://github.com/redbear/nRF5x/tree/master/nRF52832/arduino

sandeepmistry commented 7 years ago

cc/ @don

soundanalogous commented 7 years ago

I saw this and was happy, then I check RBL's code only to see they are still breaking everything in favor of MBED: https://github.com/redbear/nRF5x/blob/master/nRF52832/arduino/arduino-1.8.0/hardware/RBL/RBL_nRF52832/cores/RBL_nRF52832/WStream.h#L39. Sigh....

drmpf commented 7 years ago
#if defined( NRF52 )
  #include <WStream.h>
  #define Stream WStream
#else
  #include <Stream.h>
#endif

works for me

soundanalogous commented 7 years ago

Yeah something like that would work (but I'd use a constant that identifies the specific board since NRF52 may actually apply to boards from other vendors at some point), but it gives into the issue rather than putting pressure to fix it (RBL's code is broken, not mine). But yeah, after 2 years back and forth on this issue I must either give in or give up.

drmpf commented 7 years ago

I agree, there is a bug in the RedBear NanoV2 Board code for Arduino. The ARDUINO_RBL_nRF52832 define is NOT defined when the extra libraries are compiled. Took me a while to work that one out.

drmpf commented 7 years ago

Any idea when V0.5.0 will be published with this merge? I have published an instructable for BLE Nano V2 based on V0.4.0 with instructions to overwrite the two files.