I am new to wireless communication. Recently, I bought a DA14531 USB evaluation kit and programmed it with the ble_app_peripheral example ((SDK6.0). I can control the LED on the evaluation board from the LightBlue app on my phone. Next, I would like to read the state of the push button on the evaluation board and automatically update the value in the LightBlue app when the notification is enabled. I have reviewed the code for many hours but no success so far. Also, I searched for read/notify examples without success. If possible, can you please point to the examples or the code where I can enable this functionality?
Thank you so much for your time.
Hi There, Thanks for your question online and for your interest in our DA4531 solution.
Since you are a new DA14531 user, I would recommend first checking the SDK getting started tutorial : http://lpccs-docs.renesas.com/Tutorial_SDK6/index.html
Please refer to chapter 8 which demonstrates how to read the pin status : http://lpccs-docs.renesas.com/Tutorial_SDK6/digital_in.html
After reading the pin status by using the GPIO_GetPinStatus() you will need to transit the value via BLE notifications.
In ble_app_peripheral example, the app_adcval1_timer_cb_handler() sends the variable 'sample' via notifications. So, you should modify the code and send the pin status.