I am attempting to write some code for a bluetooth project to send to IOS "LightBlue" app and want to use the "CurieBLE" library that you need for this. I have tried several times to get this CurieBLE library code to compile with the provided examples but keep getting error codes (invalid configuration or missing #include .h files), has anyone got this library working on an arduino? Also I am wondering to get round this by just using softwareserial on the arduino which sends the UUID,service value etc... serially hence not needing the BLE libraries at all?
Just an update I tried an alternative library (ArduinoBLE.h) that states:
"#error "Unsupported board selected!"
when trying to upload compile to Arduino Nano? Not sure what boards are supported?
Even though you see some Nano boards listed there, they are very different than the classic Arduino Nano, which is not supported by the ArduinoBLE library.
You should also note that just because a library says "BLE", doesn't mean that it's compatible with any BLE module you happen to buy off eBay. From your mention of "SoftwareSerial", I'm guessing the Bluetooth module you are using would not be compatible with those libraries even if connected to a supported board. You should do a search in the Library Manager for the model number of your Bluetooth module. You'll find a library for it there.
If not, then you need to tell use which one you are using so we can provide guidance.
Sure. You can just find the datasheet or user's manual for the hardware and get the AT commands. Libraries can be convenient, but they are not magic. Any code someone can put in a library, you can put directly in your Arduino sketch instead.
Hi Pert, As you suggested I will order a Nano 33 IOT (Has bluetooth & wifi?) this should hopefully solve the library compiling problems. The bluetooth module I am currently using is a HM-10 module and I have successfully managed to send serial data to it and via bluetooth (Bluetooth console app) by using "softwareSerial". It seems if I want to do anything more involved like send UUID & service data I have to program the bluetooth module itself?
That's correct. It's a pretty nice board. I like the Nano form factor a lot because it's breadboard friendly and small enough to integrate into a finished project well.
The ATSAMD21G18 primary microcontroller (there are actually two on the Nano 33 IoT when you count the ESP32 used for wireless communications) is a little bit more advanced when compared to the beloved AVR chips on the classic Arduino boards, but enough years have passed for the SAMD support to grow to a pretty excellent level, so I think it's a good balance between modern performance and a mature ecosystem.
I don't have much experience with these modules beyond providing general support here on the forum, but it is my impression that they are fairly limited as far as advanced Bluetooth capabilities. On the other hand, sometimes all you really want is a wireless serial bridge, and in that case one of those popular modules might be just the thing!
That 'ATSAMD21G18' does look a bit of a beast! The nano 33 I think will do for the project I am working on (if the library's work!) and then I am thinking in the future I may switch to Atmel Studio as I think this is more professionally used than Arduino? I think that Arduinos are good for speeding up coding and testing but in the long term a more professional compiler is needed...