Utilizing the Client/Server BLE to get ADC data | Cypress Semiconductor
Utilizing the Client/Server BLE to get ADC data
I am using a CY8CKIT-042-BLE PSoC 4 bluetooth kit, and the end goal of this objective I am trying to complete is, I want to utilize the bluetooth dongle (CYBL10162-56LQXI) as a central hub to gather ADC value from the PSoC peripheral (CY8C4247LQI-BL483). I noted that the bluetooth dongle, when using the 100 projects 100 days Day 13 Client/Server program (https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Pro...) that depending on the commands by the dongle, it can enable/disble notifications as well s read the Tx Power level.
I want to modify it in such a way so that when the command for reading Tx power level is sent via the bluetooth dongle, that instead of getting the TX power level, it gets an ADC value from the PSoC. The PSoC itself will have its own set up of an ADC SAR SEQ which would give just an ADC value gathered, example could be temperature. But the problem is that I am unsure how to go about it. I don't know if it is a modification within the PSoC's programming, and the understanding of what the CYBLE_TPS_TX_POWER_LEVEL value would be, or if it can grab the value of an ADC input from the PSoC in some other way. Could someone point me in the right direction of how to proceed?
I noted that one of the functions within the peripheral is "CyBle_TpssSendNotification()" which in its current set up, sends the power level. can that be modified in such a way to send the adc value instead?
Went into it a bit more and found the end of sending notification has to do with the CyBle_GattsNotification() function. presuming the same cyBle_connHandle, what would need to change is the type for CYBLE_GATTS_HANDLE_VALUE_NTF_T (aka CYBLE_GATT_HANDLE_VALUE_PAIR_T), but I dont really know what type it is and it will nto let me look it up