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

How to configure "ble_nus_send_string" in nRF51822

Hi every body,

i try to use 10 bit ADC resolution instead of 8 bit in the ble_uard_adc example, the problem is the ble_nus_send_string is configure to 8 bit, how can i re-configure it to 16 bit to send a 10-bit ADC analog reading?

Thanks

Parents
  • Dear Stefan,

    First of all , thank you very much four your support

    When i try to transmit two byte that mentioned above, i get a zero value in adc_result[1] and the adc_result[0] contains a normal value.

    Please i have another question, if i want to use two 10-bit ADC channels and send there values at same string but separated by comma "," how can i do this?

    Thanks again for your valued advice

    Best Regards

  • Hi ahmed

    What voltage are you feeding to Analog input pin 2 (AIN2 or P0.01)? I suspect that you have low voltage on AIN2, then you will get low ADC output value and the last two bits will be zero, which are the two bits put into adc_result[1]

    You can only send raw bytes over the air via the softdevice. If you want a specific format you need to apply that on the receiver side.

Reply Children
No Data
Related