Botzo SDK - Client Library for MCU communication#10
Botzo SDK - Client Library for MCU communication#10PedroS235 wants to merge 5 commits intoIERoboticsAILab:mainfrom
Conversation
This is very basic, only contains the implemention to ping and set a GPIO
This commit brings a change in name to the package. Now it is named botzo_sdk. This will serve the main entry point to interact with the microcontroller/hardware and offers a BoztoClient which handles all the communication behind the scenes with the MCU. The current state is still very limited and still needs development in order to obtain a stable version. For now, supported features are connect and disconnect, sending and receiving packets -> PING command is working. Additionally, it already handles when a stream of data is enabled, the case for the IMU. However, BotzoClient is not yet ready for this.
|
Thank you for the contribution. Looking forward to see the progress. Looking promessing. |
|
@GRINGOLOCO7 yes, I am aware that you are using the Mega and Pi 4 via USB. This current implementation is exactly for that purpose, that's what Serial means, as in USB is a serial protocol. The good thing about this is that it's should be relatively easier to expand to other protocols. Now in my case I am using an ESP32, which is more powerful and also offers Wi-Fi + Bluetooth, and it's very inexpensive. I would argue that using an Arduino Mega today is not a very good solution giving that an ESP32 is very cheap and small too. Now, the firmware the only say drawback is that with Arduino Mega we cannot use FreeRTOS, it's basically a very tiny operating system. But I guess I could support both versions if you guys would like. |
Client Library for Botzo Robot Communication
I've started building a client library for Botzo that handles communication between the microcontroller and the host computer (Raspberry Pi). This PR is still a draft as the work is ongoing.
What's Implemented
Serial Communication Interface
Simple Packet Protocol
All communication uses a simple packet structure:
Where:
How It Works
The protocol handles creating packets for different commands. For example, a basic ping to check the connection:
Main Component: BotzoClient
The BotzoClient class is the main entry point. It wraps all the complexity of the communication layer, so you don't have to deal with packets and protocols directly.
Design Benefits
Two-Way Communication
For example, we can start IMU streaming where the MCU automatically sends sensor data at regular intervals without needing to request each reading.
Next Steps
This requires matching firmware on the microcontroller that implements the same protocol, which is currently being developed in parallel.