Hi , In my project , i can use the battery service in my project. But if i want to use the another four ADC channels , how to add it ?
my project is working at SDK 9 & s110.
Thanks.
Hi , In my project , i can use the battery service in my project. But if i want to use the another four ADC channels , how to add it ?
my project is working at SDK 9 & s110.
Thanks.
Hi Greed
I dont think we have a direct example that shows how to do this, but there is an old example here that shows an example on how you can sample on multiple pins with the nRF51 ADC. There is also a ADC example here with softdevice for SDK 9.
Hi.
Sorry that i add comment for a long time .
Using this example's mode in my project's that has NUS & battery service main function .
I can see the data by terminal in the first . But when i send the data from phone by NUS service , it will stop working.
I guess that it is error at below picture which initial battery adc_init() and adc1() conflicting.
Can i add the another ADC into the RTC function?
Do you have some suggestions?
Thanks.
Seems that you are mixing a littlebit manual configuration and driver configuration here, not sure how that would mix. I would recommend to either write directly to the ADC registers or always use the driver to configure the ADC.
When you send a message from the phone via NUS service, the NUS handler should be called, which is the nus_data_handler in the ADC-UART example. What happens in the NUS handler? Is any error returned, or why does it not work? Try to debug through it. Debugging is somewhat described here and here