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

Getting nRFConnect and the nRF51 working with Visual Studio?

I'm very new to nRF BLe coding and I am having trouble finding what I need to proceed.

I have some PC Boards with inputs and I can connect to them through nRFConnect Bluetooth Low Energy app fine and then push buttons and see in the Log file the buttons I have pushed.

It says I have connected on COM 3 and everything seems to be working peachy.The BYTEs come through as I push buttons.

The trouble is I need those push buttons to trigger things in Unity (basically a C# project in Visual Studio).

I tried to listen on COM 3 to see if I can get the BYTEs being sent to the nRF Connect program but of course only 1 program can listen on a COM port at a time so it isn't possible,

I have installed VisualGDB but dont know how to get any examples in Visual Studio to mimic what nRF connect is doing and connect to the same nRF51 device.

I have read that I might want to monitor a log file to get the data but that seems to be a little bit clunky and there must be a more elegant solution for me to connect to the device and get the inputs into Visual Studio.

Would anybody be kind enough to point me in the right direction on what I should be doing to learn a little more on connecting to the dongle, then connecting to my boards so I can read their BYTEs?

Any help would be greatly appreciated.

Lindsay.

Parents Reply
  • Thank you for the advice,

    I took a look at setting up a UART project following this example here:
    https://visualgdb.com/tutorials/arm/nrf51/uart/

    But I am getting stuck with certain things not matching up on my environment and my inexperience in this area is preventing me from being able to debug it properly and tailor the project to work with the devices I have.

    I know I can see the BYTEs I need in nRFConnect on COM 3 so I will see if I can somehow get those out perhaps with com0com so I can use them elsewhere.

    One more question, is there a way to get the BYTEs directly out of nRFConnect instead of trying to mirror the serial port with com0com?

    Thanks again,

    Lindsay.

Children
Related