BLE_UART for driving STS Servo (LeRobot SO101)

Hi, @Pammy:

If I want to use BLE UART for Serial2 to STS Servo,
which AMB82-MINI example code should I use ?

Thanks !

Richard

:waving_hand: Thanks for posting!

For documentation, SDK resources, FAQs, and community guidelines, please visit: here

For commercial users, if you would like to have dedicated technical support or to connect with us, please fill in the Private User Form

Happy building with Ameba!


:waving_hand: 感謝您的分享!

如需查閱技術文件、SDK 資源、常見問題及社群指南,請參考: 這裡

若您是商業用戶,希望獲得專屬技術支援或與我們聯繫,請填寫 Private User Form (商業用戶表單)

祝您使用 Ameba 開發順利!

Hi @rkuo2000,

There are two examples you can explore.

BLEUARTService:

BLEUARTClient:

Here are a few suggestions you can try.

For communicating with the STS servo, you can keep the existing Serial usage as-is and add Serial2 as a separate UART interface for the servo.

For example, you can:

  • Add Serial2.begin({baudrate}); in setup() using the baud rate required by your STS servo.
  • Forward the data received through BLE to Serial2 in writeCB().
  • Read the response from Serial2 in loop() and send it back through BLE.

So the main idea is to use BLEUartService.ino as the base example and replace/add the UART data path with Serial2 for the STS servo.