Hello,
I am working on the HIDEmuKbd project example, and I am trying to find information about two situations:
1) what sequence of events happens when one of the keys is activated and the peripheral starts advertising? I tried finding it just following the code, but to no avail. Specifically, what function is called that starts advertising and how is either Key1 or Key2 involved?
2) what variable, if any, can tell me when the peripheral is connected to a central?
I am adapting the project to my application, but I need to know these two states of the peripheral, so that I can interact with sensors on my board. Everything is working fine, except that I am not being able to synchronize the sensors with the connection intervals. Ideally, I would like to interact with them at the end of the connection interval, to save power, besides doing calibration and initialization only when I know it is connected to a central device.
Thanks for any pointers,
Julio