Programming the Bittle via its mobile App
The mobile apps of Petoi have a simple yet powerful interface to teach adults and kids how to program robots.
Petoi Mobile App
We were part of the Kickstarter campaign of Petoi Bittle robot and first wrote about the Bittle robot in March 2021. We have seen how the Bittle robot has become popular in research and industrial use cases.
However, one powerful feature of Bittle that is often overlooked is its ease of use as a platform to learn the mechanics of robots, especifically quadruped robots. While there are a lot of home robots in the edu-tech marketplace, our job at ‘Learn With A Robot’ strive to identify those robots which can be programmed easily, and thereby useful as a tool to learn coding as well as robotics. And we are happy to report that the Petoi Bittle gets very high scores in this regard.
Since the Bittle robot was originally released, Petoi has been working hard on it, and released a slew of software to make programming the Bittle easy. In this article, we will discuss one of the ways to program the Bittle, via its mobile app.
The Petoi mobile app is a neat way to connect to the Petoi robots (Nybble and Bittle) with a Bluetooth connection. Two main functionalities of the mobile app are: (i) To provide a way to easily calibrate the Bittle, and (ii) To provide a replacement to the physical remote control. With the help of the mobile app, you can easily move the Bittle or maneuver its postures. In this article, our main focus will be on an additional functionality in the mobile app: sending commands to the Bittle via the serial communication protocol.
Steps
The process of sending short commands to the Bittle is relatively straightforward. Here are the steps:
Open the Petoi App and connect to your powered on Bittle robot via the Bluetooth connection. Prior to this step, you must attach the Petoi bluetooth Dongle to NyBoard. In case you are using the BiBoard, the BiBoard comes inbuilt whit bluetooth, so you don’t need a separate dongle. Petoi has excellent and detailed documentation here. Once the connection is established, you have a way to issue commands from the App to NyBoard/BiBoard.
After connecting, you will be asked to choose your robot (out of Nybble and Bittle). Once you choose the Bittle, you will be taken to the control panel. The control panel is the equivalent to the physical remote control of the robot. You could make Bittle walk, sit, or do pushups from the control panel.
Specifically, for doing customized things on the Bittle, we will use the section on Customized commands. You can define your own command, which will be transmitted to Bittle, and then Bittle will act on it. Here is a screenshot…
Decide your command. Petoi has an extensive page where they define the serial communication protocol and the commands it supports. There are four different types of commands: i) Tokens, 2) Gaits, 3) Postures, and 4) Behaviors. The page above has good references, but discussing these types of commands is beyond the scope of this tutorial.
You can test your command. If it works successfully, you can save it and reuse it.
Remember, that we are just scratching the surface of what could be done with the Bittle. The mobile app interface is simply the easiest way to program the Bittle. There are many more ways you can use the mobile app to control and program the Bittle robot. Petoi’s manual lists all the detailed posibilities.
Remember that the serial communication protocol is also inherently limited: (i)You can only send a single command, or a small group of commands, and (ii) The command needs to be short. Petoi provides you options for more advanced programing for the Bittle, as an example, you could code your own gait via the open source OpenCat software.
Examples
Using the serial protocol, we were able to make Bittle do shoulder exercises. The command is:
m 9 -120 9 45 8 -120 8 45Make sure that your Bittle is sitting before you send this command, else it is likely to topple over. Here is a video on how this looks like:

You can also ask Bittle to do a back flip using the following command:
kbfAnd here is a video showing how the Bittle backflips.
In summary, we see a lot of potential for Bittle to be used as a STEM learning gadget. If you are interested in learning with the Bittle, make sure to subscribe to ‘Learn With A Robot’. If you have experience writing programs for Bittle, please add your feedback to this post.



