Sending Custom Data from server to client PSoC 4 BLE devices | Cypress Semiconductor
Sending Custom Data from server to client PSoC 4 BLE devices
Essentially, I am working on a project whose scope is to have a PSoC 4 BLE device communicate via I2C to an accelerometer device. This device will output 3 16 bit x, y, z data chunks. I would then like to take this data, and send it via Bluetooth to another PSoC 4 BLE device. At this point, I am struggling with understanding how the best way to send this data is.
I have been working primarily with the Running Speed and Candence program that Cypress provides. My main question is, how do I get data from the server, to the client. At this point, my initial thoughts are to create a custom characterisitc within either the Custom Service or the Running Speed and Cadence Service. I would name this custom characterisic something like "accelData" and within it, have 3 fields, such as "x_data", "y_data" and "z_data". Then I would write values to these fields.
I don't know if this is the correct way to go about sending custom data from the server to the client. I have not been able to figure out a way to change the values yet.
Should I create multiple custom characteristics? Should I make custom descriptors? How do I change the values of these as the accelerometer data comes in? Which API's will be needed here? I assume I will use CYBLE_RscssSetCharacteristicValue(...);
I am hoping there may be someone who has encountered a similar situation to this and would be able to guide my thinking in this matter.
Thanks in advance for the help. I can upload screenshots of code, add more information or clarify questions if need be.