The point of this project is I'm trying to continuously monitor the voltage of a sensor that is connected to analog in on my pioneer kit. I want to be able to use the mobile app to see the sensor reading. Does anyone have any projects that currently do this? It would be even better if the mobile app could graph the voltage values in real time on the phone but this is not required.
You can add a custom service, with a single characteristic that represents the ADC reading. When updating this value, you can send a notification to the BLE app.
That way the BLE app receives the current value, and can also graph it if it wants to.
Thanks for your comment. When configuring the BLE settings, I created a custom profile with profile GATT and GAP peripheral. Then I set the custom service UUID to CAB5. When I get to custom characteristic, what should I set the UUID to if I'm trying to send ADC values? Also what descriptor properties should I check? I am brand new to this, so steps to set up the BLE would be very helpful.
1 of 1 people found this helpful
The UUID is generally a random constant used (by you/apps/software) to determine if you are accessing/reading/writing to the characteristic/service that you want to. Thus, the UUID will be auto-generated to a 128-bit value that you can use as a unique identifier (the 16-bit UUIDs are standard values assigned by the BLE SIG). As long as you use the same UUID when reading/writing from both BLE chips/phones/apps, then it will not matter what the specifc UUID is.
Thus, you can generate the custom characteristic in the BLE component, then check that you compare to that UUID constant value in the characteristic when you read/write to it from software.
The descriptor properties will set whether it allows Read/Write/Broadcast/etc. for data access. And the permissions allows some filtering for which encryption/authentication levels of access are available for each characteristic. (Generally, I would check Read if you want the other side to be able to read it, Write if you want the other side to be able to write it, and Notify if you want to be able to send notifications for that characteristic. The other check boxes have various applications/restrictions upon them, but generally not used imo).
If you look at the "Generate UUID" that I circled in the attached image, you can use this to create a relatively unique UUID rather than having to keep track of the values yourself (otherwise you can keep track yourself :) )