I got some of the very cute XAIO ESP32C3 micro-controllers that support Bluetooth LE. I went looking for a code example. I found one in C++ and one in Python, but the Python one was obsolete and didn't work. So here is a simple example in Python that implements a URT device. Connect to it with a Bluetooth terminal and it will echo back what you send it. Nothing fancy but it will get something working for you.
我买了一些非常可爱的支持低功耗蓝牙 BLE 的 XAIO ESP32C3 单片机。我去寻找一个代码示例。我找到了C++和Python,但是Python已经过时了,不能工作。下面是一个在 MicroPython 中实现了 UART 设备的简单示例。通过蓝牙终端连接到它,它会回复你发送的东西。没什么特别的,但它会为你提供一些有用的东西。