---
title: Examples
description: Code examples for SimplePyBLE.
---

To learn how to use SimplePyBLE, please refer to the [examples](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble) provided in the repository.

The following list briefly describes each example provided:

- **[list_adapters](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/list_adapters.py)**: List all available adapters.
- **[scan](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/scan.py)**: Scan for nearby BLE devices.
- **[connect](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/connect.py)**: Connect to a BLE device and list its services and characteristics.
- **[read](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/read.py)**: Read a characteristic's value.
- **[write](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/write.py)**: Write a characteristic's value.
- **[notify](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/notify.py)**: Enable notifications on a characteristic.

### Asynchronous API

- **[scan_async](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/scan_async.py)**: Scan for nearby BLE devices using `asyncio`.
- **[notify_async](https://github.com/simpleble/simpleble/tree/main/examples/simplepyble/notify_async.py)**: Enable notifications on a characteristic using `asyncio` and `async def` callbacks.
