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

nRF connect 2.6.2 for pc attribute value conversion to string.

Hey, I use nrf52 dk with nrf5 usb dongle. I am using this ble_app_uart__saadc_timer_driven__scan_mode example, I think it is working just fine, but the values are in hex-format right?

 Here is a screenshot from log in nrf connect pc:

So, I am having hard time understading how the adc values are put in that message. The example uses 4 inputs and prints the values in termite just fine.

Also, why I can't open the log file. When I press the putton on nrf connect pc -app it does nothing at all. Is the log file saved somewhere?

I tried to use sprintf (picture below) to make sent values to string but it had no effect.

  • Hi,

    nRF Connect lists the hexadecimal values of the bytes sent. For instance for the values on the bottom row of your screenshot, "31-39-38-00-C3-00-C6-00", the first four values correspond to the ASCII characters 1, 9, 8, <NUL>. So this is mostly a question about how to interpret the data (and how to encode it.) Termite, for instance, will display the ASCII characters representing the bytes it receives over UART. (And similar for sending.)

    The log file button should open the log file in a default text editor. Default log file location on Windows is "%APPDATA%\nrfconnect\pc-nrfconnect-ble\logs".

    Regards,
    Terje

  • Okay, thanks. Futher question: I want to simply use a signal generator to produce analog signal, and see if the adc values are pretty much same (using continous sine wave). So can I just put wire (output of the signal generator) to AIN4 and the ground wire of signal generator to GND on DK, or do I need some other wires? Also what is the maxium Vpp value I can use without damaging the board?

  • Hi,

    Yes, you can connect directly to the signal generator. As long as you connect the signal ground to nRF GND and keep within the min and max values specified under Absolute maximum ratings in the nRF52832 product specification you should be good. For nRF52832 the safe range is min -0.3 V and max VDD + 0.3 V, where VDD is max +3.9 V.

    Regards,
    Terje

Related