I already had a look at the custom characteristic tutorial and have completed it. Populating the Sensor value with characteristic is the next step where I am facing trouble. Thank you !
I already had a look at the custom characteristic tutorial and have completed it. Populating the Sensor value with characteristic is the next step where I am facing trouble. Thank you !
Please don't put the whole question in the title:
I already had a look at the custom characteristic tutorial and have completed it
Isn't that covered in the Tutorial?
I am facing trouble
What "trouble", exactly?
I am getting the values of sensor using add every 1second. and I have stored it in a local variable in saadc callback function.
Now this value that's getting updated how do I pass it to characteristic. The one shown in tutorial is some function regarding inbuilt sensor. In timer timeout handler how do I get the saadc value ?
Apologies for not asking question in expected manner
Kind Regards,
NSS
It really doesn't make any difference where the data comes from - it's all just data.
I already had a look at the custom characteristic tutorial
You mean this:

Yes the tutorial in link. My question is how do i update the saadc value to characteristic. How in step 3F the value gets updated each time temperature changes after calling the function(in the tutorial above). I have my saadc value in saadc call back stored in float variable named val.
Yes the tutorial in link. My question is how do i update the saadc value to characteristic. How in step 3F the value gets updated each time temperature changes after calling the function(in the tutorial above). I have my saadc value in saadc call back stored in float variable named val.
My question is how do i update the saadc value to characteristic
Again:

temperature_value there is just a standard C variable - so you just use your variable which has your value in it.
Thank you for your reply but how do I get the values out From saadc handler and put those values in the said variable. I am quite confused. I am new to programming sorry if my questions are unclear.
This has nothing specifically to do with Nordic or BLE - this is just standard C programming stuff.
You will need a "global" variable that is accessible to both your SAADC handler and your characteristic update routine.