So i recently bought a PCB with a nRF51822 microcontroller and accelerometer. The accelerometer that is on the PCB is the lis2dh. Now I want to program the nrf51822 to send the accelerometer data trough ble. But I have no clue where to start.
I found the "nRF5_SDK_15.0.0_a53641a" file where in C:\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_beacon is a main code included but I don't really understant the code. Is anyone who can give me tips how to start writing the code? The only IDE I am used to is the one from Arduino because that's all my school cared about. I now the nrf51822 is programmable with the Arduino IDE and I got the package needed for the nrf 51822 but again no clue how to start with the code because ble and beacons are kind of new to me.
Thanks in advance.
I recommend having a quick look at the Getting Started guide, then look into our Tutorials, in particular the Getting Started and Bluetooth low energy sections. After that the rest of the nRF5 SDK documentaiton should be useful. And of course you can search for answers to your questions here on DevZone.
I also recommend that you start using Segger Embedded Studio with our SDK, as that is the main IDE that we support.
Other DevZone users may of course have their own recommendations, hints and tips, and are free to share theirs in this thread.
Thank you for your answer.
So it is not possible to program my beacon with the IDE form Arduino? That's like the only IDE I know because my school didn't include other IDE's accept for Matlab in the projects and lessons. So any other IDE would take some time to learn
To be honest I do not know what you will be able to do with that IDE, as I have never tried it. We do not have any examples using that IDE, and our SDK is made with support for Segger Embedded Studio, for Keil, for IAR, and for gcc. While in theory you can set up a project in any IDE with gcc support, it is not necessarily easy to do so. In most (if not all) cases it is best to go with one of the officially supported IDEs, so that you can start off with a project that is correctly set up for that IDE and toolchain.
Also, we mostly only know how to use the supported IDEs, so if you choose to use something else you will often be on your own.
Thanks again for the answer.
Do you have any start up tutorial for Segger or Keil, to guide my way into it?
For Segger Embedded Studio we have a tutorial playlist on YouTube: Getting started with SEGGER Embedded Studio and the nRF5 SDK. Apart from that I refer to the sources I linked to previously in this thread.