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

receive data from the peripheral

hello everybody!

i want to sample an analog signal with  the board and send the 0/1 data with ble to the receiver .

i created my on service with rx and tx like in ble uart example but i don't now how to read the data received from the board . how could i do??

thans a lot for your answer!

marikalp.

Parents Reply
  • ok my your_data_pointer is for me the input pin 28, the sampling function i wrote was something like this:

     uint32_t  pin_value=nrf_gpio_pin_read(28);
         
          if (pin_value==0)
          {
          nrf_gpio_pin_clear(15);
          m_custom_value=0;
          ble_nus_data_send()
         
          }
          else  if (pin_value!=0)
          {
          nrf_gpio_pin_set(15);
          m_custom_value=1;
          ble_nus_data_send()

    BUT i don't how to face that with the uart and all the program

    thanks a lot really for your answer!!

    best regards.

Children
Related