An open API service indexing awesome lists of open source software.

https://github.com/zauberzeug/esp32-ble-command

BLE module for lizard
https://github.com/zauberzeug/esp32-ble-command

Last synced: 10 months ago
JSON representation

BLE module for lizard

Awesome Lists containing this project

README

          

# esp32-ble-command

Receive unformatted text commands via a single BLE service / characteristic pair.

# Example usage

```C++
#include
#include
#include
#include

extern "C" {
auto app_main() -> void;
}

auto app_main() -> void {
/* Initialize NVS — it is used to store PHY calibration data */
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);

ZZ::BleCommand::init("MyDeviceName", [](const std::string_view &com) {
std::printf("Command: [%.*s]\n", com.length(), com.data());
});
}
```

## License

MIT