Skip to content

Commit

Permalink
BW16-TypeC Wiring Diagram Updates (#40)
Browse files Browse the repository at this point in the history
* Update BW16-TypeC Wiring Diagram examples
* Update .po files
  • Loading branch information
daphwl committed Aug 16, 2022
1 parent 0d9adb8 commit 2857ed0
Show file tree
Hide file tree
Showing 1,667 changed files with 44,112 additions and 41,705 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,26 @@ less features:
- Android: https://play.google.com/store/apps/details?id=com.punchthrough.lightblueexplorer
- iOS : https://apps.apple.com/us/app/lightblue/id557428110

Open the example, ``“Files” -> “Examples” -> “AmebaBLE” ->
Open the example, ``“Files” “Examples” “AmebaBLE”
“BLEBatteryService”``

|1|
.. image:: /media/ambd_arduino/BLE_Battery_Service/image1.png
:align: center
:width: 1058
:height: 972
:scale: 72 %

| Upload the code and press the reset button on Ameba once the upload is
finished.
| On your mobile phone, open the Bluetooth app and scan for the
Bluetooth signal broadcast by Ameba, it should appear as a device
named “AMEBA_BLE_DEV”.
Upload the code and press the reset button on Ameba once the upload is
finished.
On your mobile phone, open the Bluetooth app and scan for the
Bluetooth signal broadcast by Ameba, it should appear as a device
named “AMEBA_BLE_DEV”.

|2|
.. image:: /media/ambd_arduino/BLE_Battery_Service/image2.png
:align: center
:width: 1148
:height: 2880
:scale: 34 %

Connect to the Ameba Bluetooth device, and a list of available services
should appear. Click on the battery service to expand it, and you can
Expand All @@ -68,18 +76,29 @@ the right are used to read data and subscribe to notifications. Click on
the single arrow to read the battery level value, and a 90% value will
appear.

|3|
.. image:: /media/ambd_arduino/BLE_Battery_Service/image3.png
:align: center
:width: 1148
:height: 2880
:scale: 34 %

Click on the triple arrow to subscribe to updates on the battery level
value, and the battery value will start updating by itself.

|4|
.. image:: /media/ambd_arduino/BLE_Battery_Service/image4.png
:align: center
:width: 1148
:height: 2880
:scale: 34 %

The serial monitor will show the sketch increasing the battery level
every second. When you click on either of the arrows, the sketch running
on the Ameba will be notified, and will print out the action taken.

|5|
.. image:: /media/ambd_arduino/BLE_Battery_Service/image5.png
:align: center
:width: 749
:height: 509

:raw-html:`<p style="color:#E67E22; font-size:24px">`
**Code Reference**
Expand All @@ -88,7 +107,7 @@ on the Ameba will be notified, and will print out the action taken.
BLEService and BLECharacteristic classes are used to create and define
the battery service to run on the Bluetooth device.

``BLE.configAdvert()->setAdvType(GAP_ADTYPE_ADV_IND)`` is used to set the
``BLE.configAdvert()setAdvType(GAP_ADTYPE_ADV_IND)`` is used to set the
advertisement type to a general undirected advertisement that allows for
connections.

Expand All @@ -101,23 +120,3 @@ be one service running.

``addService()`` registers the battery service to the Bluetooth stack.

.. |1| image:: /media/ambd_arduino/BLE_Battery_Service/image1.png
:width: 1058
:height: 972
:scale: 50 %
.. |2| image:: /media/ambd_arduino/BLE_Battery_Service/image2.png
:width: 1148
:height: 2880
:scale: 30 %
.. |3| image:: /media/ambd_arduino/BLE_Battery_Service/image3.png
:width: 1148
:height: 2880
:scale: 30 %
.. |4| image:: /media/ambd_arduino/BLE_Battery_Service/image4.png
:width: 1148
:height: 2880
:scale: 30 %
.. |5| image:: /media/ambd_arduino/BLE_Battery_Service/image5.png
:width: 749
:height: 509
:scale: 100 %
40 changes: 19 additions & 21 deletions docs/source/ambd_arduino/examples/network/BLE - BLE Beacon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,31 @@ supports the iBeacon and AltBeacon protocols.

**Procedure**

| First, you need to install some Bluetooth apps on your mobile phone.
These apps will show you the raw data sent by Ameba and allow you to
interact with the data.
| The recommended application is nRF connect, and is available at the
links below:
First, you need to install some Bluetooth apps on your mobile phone.
These apps will show you the raw data sent by Ameba and allow you to
interact with the data.

- Android
: https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp
The recommended application is nRF connect, and is available at the
links below:

- Android: https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp

- iOS :https://apps.apple.com/us/app/nrf-connect/id1054362403

LightBlue is an alternative application that can also be used, but has
less features:

- Android
: https://play.google.com/store/apps/details?id=com.punchthrough.lightblueexplorer
- Android: https://play.google.com/store/apps/details?id=com.punchthrough.lightblueexplorer

- iOS :https://apps.apple.com/us/app/lightblue/id557428110

Open the example, ``“Files” -> “Examples” -> “AmebaBLE” -> “BLEBeacon”``
Open the example, ``“Files” “Examples” “AmebaBLE” “BLEBeacon”``

|1|
.. image:: /media/ambd_arduino/BLE_Beacon/image1.png
:align: center
:width: 722
:height: 1006
:scale: 69 %


Upload the code and press the reset button on Ameba once the upload is
Expand All @@ -65,7 +68,11 @@ finished.
On your mobile phone, open the Bluetooth app and scan for the beacon
signal broadcast by Ameba.

|2|
.. image:: /media/ambd_arduino/BLE_Beacon/image2.png
:align: center
:width: 1440
:height: 2880
:scale: 24 %

If you happen to be in an environment with multiple BLE beacons, you can
tap the entries to expand them, and verify that the beacon data is
Expand Down Expand Up @@ -103,12 +110,3 @@ non-connectable.

``BLE.beginPeripheral()`` starts Ameba in Bluetooth peripheral mode, after
which it will begin to advertise with the beacon data provided.

.. |1| image:: /media/ambd_arduino/BLE_Beacon/image1.png
:width: 722
:height: 1006
:scale: 80 %
.. |2| image:: /media/ambd_arduino/BLE_Beacon/image2.png
:width: 1440
:height: 2880
:scale: 30 %
30 changes: 15 additions & 15 deletions docs/source/ambd_arduino/examples/network/BLE - BLE Scan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,24 @@ out the results to the serial monitor.

**Procedure**

Open the example, ``“Files” -> “Examples” -> “AmebaBLE” -> “BLEScan”``
Open the example, ``“Files” “Examples” “AmebaBLE” “BLEScan”``

|1|
.. image:: /media/ambd_arduino/BLE_Scan/image1.png
:align: center
:width: 711
:height: 1006
:scale: 79 %

| Upload the code and press the reset button on Ameba once the upload is
finished.
| Open the Arduino serial monitor, and you should see the scan results
of nearby Bluetooth devices formatted and printed out.
Upload the code and press the reset button on Ameba once the upload is
finished.
Open the Arduino serial monitor, and you should see the scan results
of nearby Bluetooth devices formatted and printed out.

|2|
.. image:: /media/ambd_arduino/BLE_Scan/image2.png
:align: center
:width: 757
:height: 907
:scale: 88 %

If you have the Bluetooth app nRF Connect installed, you can also use it
to send out Bluetooth advertisements for the Ameba to pick up.
Expand Down Expand Up @@ -69,11 +77,3 @@ duration of 5000 milliseconds. The scan will repeat according to the set
scan interval and scan window values. After 5000 milliseconds, the scan
process will stop, and will be ready to be started again.

.. |1| image:: /media/ambd_arduino/BLE_Scan/image1.png
:width: 711
:height: 1006
:scale: 70 %
.. |2| image:: /media/ambd_arduino/BLE_Scan/image2.png
:width: 757
:height: 907
:scale: 80 %
41 changes: 20 additions & 21 deletions docs/source/ambd_arduino/examples/network/BLE - BLE UART Client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,29 @@ the UART service.
On the first board, upload the BLE UART service example code. Refer to
the example guide for detailed instructions.

For the second board, open the example, ``“Files” -> “Examples” ->
“AmebaBLE” -> “BLEUartClient”``.
For the second board, open the example, ``“Files” “Examples”
“AmebaBLE” “BLEUartClient”``.

|1|
.. image:: /media/ambd_arduino/BLE_UART_Client/image1.png
:align: center
:width: 682
:height: 1202
:scale: 83 %

| Upload the code and press the reset button on Ameba once the upload is
finished.
| Reset the UART service board first, wait for the BLE advertisement
process to begin, and reset the UART client board. The client board
should scan, discover, and connect to the service board. After
connecting, the client board will verify that the correct UART service
exists on the service board, before enabling notifications on the TX
characteristic. Any message typed in the serial terminal will be sent
to the other board using the UART service.
Upload the code and press the reset button on Ameba once the upload is
finished.
Reset the UART service board first, wait for the BLE advertisement
process to begin, and reset the UART client board. The client board
should scan, discover, and connect to the service board. After
connecting, the client board will verify that the correct UART service
exists on the service board, before enabling notifications on the TX
characteristic. Any message typed in the serial terminal will be sent
to the other board using the UART service.

|2|
.. image:: /media/ambd_arduino/BLE_UART_Client/image2.png
:align: center
:width: 779
:height: 619

:raw-html:`<p style="color:#E67E22; font-size:24px">`
**Code Reference**
Expand All @@ -55,11 +62,3 @@ objects corresponding to the services, characteristics and descriptors
that exist on the connected device. These objects can then be used to
read and write data to the connected device.

.. |1| image:: /media/ambd_arduino/BLE_UART_Client/image1.png
:width: 682
:height: 1202
:scale: 60 %
.. |2| image:: /media/ambd_arduino/BLE_UART_Client/image2.png
:width: 779
:height: 619
:scale: 70 %

0 comments on commit 2857ed0

Please sign in to comment.