The TWI Scanner Example allows to scan the TWI bus in order to look for connected TWI devices. You can use it to find the address of a single device or to count the devices connected to the nRF board.
The application read sample data on all of possible TWI addresses and waits for a response. Based on the response, the application decides if there is a TWI device connected to the nRF board with a given address.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\twi_scanner
Test the TWI Scanner Example application by performing the following steps:
It is recommended to set the flag clear_bus_init during initialization, to make sure that the device is not stuck due to a break during a previous transmission, and that it will send a response.