-
1Step 1
On the first Ameba board, upload the BLEBatteryService example code and let it run.
For the second Ameba board, open the example “Files” -> “Examples” -> “AmebaBLE” -> “BLEBatteryClient”.
-
2Final Result
Upload the code and press the reset button on Ameba once the upload is finished.
Open the serial monitor and observe the log messages as the Ameba board with the battery client scans, connects, and reads data from the Ameba board with the battery service.
Highlighted in yellow, the Ameba board with the battery client first scans for advertising BLE devices with the advertised device name “AMEBA_BLE_DEV” and the advertised service UUID of 0x180F representing the battery service.
After finding the target device, the Ameba board with the battery client forms a BLE connection and searches for a battery service on the connected device, highlighted in blue.
With the client connected to the service, the battery client begins to read data using both regular data reads and notifications, highlighted in green.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.