This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Getting started is not sufficient to get me started with nRF52840-DK

I received my nRF52840-DK (PCA10056) last week and today I was given the task to get started.

I started setup my environment with my preferred choice: Arduino IDE.
Unfortunately I could not get it to work, and some forums on the internet suggest not to use Arduino IDE because it's not officially supported.

The next choice I took is Segger Embedded Studio.
It was easy to follow and install the Nordic package.
Eventually I found out it's really easy to upload an example, as written here:
https://infocenter.nordicsemi.com/pdf/getting_started_ses.pdf

Now I want to start to develop my own programs, but I'm completely lost where to begin.
I could not find any tutorial that gets me started with the basics.

I thought the following website was a good start:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52840_dk%2FUG%2Fcommon%2Fnordic_tools.html&anchor=nordic_tools

Or:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_gsg_ses%2FUG%2Fgsg%2Fintro.html

But there is never actual content how to actually start programming.

I also tried to "reverse engineer" the examples to figure out the relation between the source files:
~/Downloads/software/nRF5_SDK/nRF5_SDK_15.3.0_59ac345/examples/peripheral/blinky

If I copy main.c from blinky to a blank project in SES, I get the following error:
no such file or directory nrf_delay.h

Is some path variable not updated? Do I need to manually add the .h files to my project?
How can I import my project from Arduino IDE to SES?
How can I communicate via serial interface?

I also noticed that blinky had a lot of external include files. Are these all necessary?

Parents
  • Hi. 

    We have quite a few tutorials, blog-posts etc. that can help you get started right here on DevZone: 
    https://devzone.nordicsemi.com/nordic/ 

    I would suggest that you start by looking at the beginners tutorials on advertising, services and characteristics. 
    Those can be found here: 
    https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy

    Best regards, 
    Joakim Jakobsen

  • I think you misunderstood my question.
    I already went through those links.

    But let me guide you through my thinking process.

    I start with the second link, Automating Nordic BLE Mesh Provisioning

    The page suggests the use of python scripts???
    I tried but I get:
    python interactive_pyaci.py -d COM20 -l 3 < command.txt
    python: can't open file 'interactive_pyaci.py': [Errno 2] No such file or directory

    There's no information on the page regarding this script, no download link and no installation instructions.

    Let's go for the first link, the tutorials
      My first impression is, are these beginners tutorials? Because I don't understand any of them.
        Also, in about every tutorial I read " It is expected that you have basic knowledge of how to use SES, keil, nRF connect etc".
    So where can I find these tutorials about SES, keil, nRF connect?

    How do I start a new project in SES?
    How do I include the nrf_delay library?
    Where do I find the examples blink, serial.println, digitalread, analogread, wire.begin, flash.read?
    Can you tell me how a project is structured. What do the subdirectories mean like nRF_Drivers, nRF_Libraries, nRF_Log?
    Where can I find a tutorial to teach me the basics in SES?

  • I understand. 

    If you are looking to learn how to use our SDK, BLE etc, I don't think starting with automating BLE Mesh Provisioning is the place to start. 

    Are you planning to work with BLE Mesh? 

    If you want more basic knowledge about BLE Mesh, I suggest that you take a look at the introduction videos the BT SIG provides on their website or maybe their own study guides. You will get some more information about the tech, terminology etc. 
    https://www.bluetooth.com/blog/an-intro-to-bluetooth-mesh-part1/ 

    For more information about how to use the different development tools that we provide, you will be able to find that here on devzone, documentation in our infocenter and general information on our official website

    All the examples we provide can be found in our nRF5 SDK. 
    We also have Nordic Semiconductor's official GitHub account, which contains officially supported repositories.
    For additional Nordic repos see https://github.com/NordicPlayground 

    We also have a youtube-channel with different educational videos. 
    Here we have a tutorial series about getting started with SES and the nRF5 SDK: 
    https://www.youtube.com/playlist?list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV 

  • No, I don't want to use BLE Mesh.

    I want to use Serial.println, digitalwrite, analogread, softwareserial, wire and flash.read

    I already looked at devzone, infocenter and the official website. They do not provide the answers I seek.

    I already watched all the educational videos. The only comment I have: the file sdk_config.h does not exist.

    I don't understand what you mean with github repositories? I need to understand how to start my own project, not opening examples that just work and are missing extra libraries.

  • I understand. 

    I'm afraid that we don't have any beginner guides on C programming, if that is what you are looking for.
    Most of the guides we have is about getting started with our nRF5 SDK and the development tools that we provide. 

    I really wouldn't suggest starting a fresh, blank project. It would require quite some work to include all the necessary files, libraries, pre-processor definitions and headers, especially if you don't have much prior experience with our SDK.

    I suggest that you find the project that is closest to what you are trying to achieve for your project, and then add or remove functionality from that. 
    Otherwise we have the ble_app_template project which is a good template project to start out with. 

    If I copy main.c from blinky to a blank project in SES, I get the following error

     This is to be expected. If you copy the main file to a blank project, the blank project won't have all the .c files, .h files, defines or settings that the project makes use of. 
    How to add files and libraries to your project is explained the Youtube-videos about SES that I linked to in my previous answer. 

    ephimee said:
    I want to use Serial.println, digitalwrite, analogread, softwareserial, wire and flash.read

     I haven't worked much with Arduino, so I can't really say if this is examples or functions that you are referring to. I don't know any specifics about them so I can't say for sure what that could relate to in our SDK. 

    I suggest you take a look at the examples we have in our SDK to find what would match your requirements the best. 

    ephimee said:
    I already watched all the educational videos. The only comment I have: the file sdk_config.h does not exist.

     The sdk_config.h file is included in most of the examples in the nRF5 SDK. 
    I.e. For the template example, you can find the sdk_config.h file in the following folder: 
    nRF5_SDK\examples\ble_peripheral\ble_app_template\pca10040\s132\config

    Opening the SES project, the sdk_config.h file should be available in the application folder in the project explorer (ref. attached image below): 

    If you have further questions, please let me know. 
    Best regards, 
    Joakim

  • No, I'm not looking for a C programming course.

    In the meantime I managed to figure out how libraries work in SES and I was able to include some additional libraries. I found the information here:

    https://devzone.nordicsemi.com/f/nordic-q-a/30904/how-to-add-library-to-a-sdk-example-in-segger-embedded-studio

    I looked at the .h files to find the functions that are available.
    In this way I was able to merge several examples and make them work.

    When I get an error that sdk_config.h is missing, I just create an empty file and it works fine. You are right,  the file is included in some examples, but not all.

    In short what I want to state is that it's pretty difficult to get started in SES. Compared with Arduino IDE, Arduino IDE is much easier.
    I would also suggest to make a video about how to include libraries and how to make blinky from scratch.
    What I'm also missing is some instruction videos attaching sensors/actuators to the nRF and make them work.

Reply
  • No, I'm not looking for a C programming course.

    In the meantime I managed to figure out how libraries work in SES and I was able to include some additional libraries. I found the information here:

    https://devzone.nordicsemi.com/f/nordic-q-a/30904/how-to-add-library-to-a-sdk-example-in-segger-embedded-studio

    I looked at the .h files to find the functions that are available.
    In this way I was able to merge several examples and make them work.

    When I get an error that sdk_config.h is missing, I just create an empty file and it works fine. You are right,  the file is included in some examples, but not all.

    In short what I want to state is that it's pretty difficult to get started in SES. Compared with Arduino IDE, Arduino IDE is much easier.
    I would also suggest to make a video about how to include libraries and how to make blinky from scratch.
    What I'm also missing is some instruction videos attaching sensors/actuators to the nRF and make them work.

Children
Related