# SimpleFoc Balancer, command format

**URL:** <https://community.simplefoc.com/t/simplefoc-balancer-command-format/7087>\
**Category:** applications\
**Created:** [April 18, 2025, 1:39pm UTC](https://community.simplefoc.com/t/simplefoc-balancer-command-format/7087 "2025-04-18T13:39:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glenn\_Collins](https://community.simplefoc.com/user_avatar/community.simplefoc.com/glenn_collins/32/8599_2.png) [@Glenn\_Collins](https://community.simplefoc.com/u/Glenn_Collins)\
**Post date:** [April 18, 2025, 1:39pm UTC](https://community.simplefoc.com/t/simplefoc-balancer-command-format/7087/1 "2025-04-18T13:39:11Z")

</div>

Hello,

I have built a balancing robot based on the simple FOC balancer example. I am using an esp32, gimbal motors, AS5600 encoders, simpleFOC mini drivers and an MPU6050. I am at the point where I am tuning the PID parameters. I am doing this manually by updating the code but off coarse this is very tedious. Could someone clarify the use of the commander functions in this example of the code. Using a ? I see the A-E commands. I need clarification of the format of the command line used at the serial terminal to change each parameter. Thank you in advance. Glenn

---

<div class="post-metadata">

**Author:** ![Glenn\_Collins](https://community.simplefoc.com/user_avatar/community.simplefoc.com/glenn_collins/32/8599_2.png) [@Glenn\_Collins](https://community.simplefoc.com/u/Glenn_Collins)\
**Post date:** [April 18, 2025, 1:41pm UTC](https://community.simplefoc.com/t/simplefoc-balancer-command-format/7087/2 "2025-04-18T13:41:36Z")

</div>

Also, if someone has developed an alternate android interface which has the ability to update the PID parameters as well as control the robot that would be great.

---

<div class="post-metadata">

**Author:** ![JorgeMaker](https://community.simplefoc.com/user_avatar/community.simplefoc.com/jorgemaker/32/546_2.png) [@JorgeMaker](https://community.simplefoc.com/u/JorgeMaker)\
**Post date:** [April 19, 2025, 8:12am UTC](https://community.simplefoc.com/t/simplefoc-balancer-command-format/7087/3 "2025-04-19T08:12:28Z")

</div>

I developed a set of commands to interact with a trapezoidal trajectory planner. You can see how it should be implemented based on the following example:

```cpp
void doPlanner(char *cmd){
  planner.doTrapezoidalPlannerCommand(cmd);
}

Commander commander = Commander(Serial);
commander.add('G', doPlanner, "Motion Planner");

```

The `doTrapezoidalPlannerCommand` function is defined [here](https://github.com/JorgeMaker/NautilusController/blob/3793cb16a24a30ebda79b85d792996f323289bd4/FirmWare/lib/TrapezoidalPlanner/TrapezoidalPlanner.cpp#L20):
