Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Baud

This API has been deprecated in favor of the Software API.

The km.baud([baud_rate]) command in the Legacy API lets developers adjust Ferrum’s hardware baud rate directly. This command is not available in the Software API due to it using a Virtual API, which means commands are optimized before being sent to the Ferrum hardware, and always communicated at 3,000,000 baud.

Developers are strongly recommended to not exceed 3Mbd (3000000 baud) with the Ferrum hardware. Data transfer may not be stable at these speeds, leading to command corruption. Furthermore, 3Mbd is more than fast enough for anything, taking just 0.050ms to send km.move(100, 100)\r\n. The default speed is 115200 baud, as explained in Legacy API.

This function has no read feature. In other words, km.baud() does nothing, where other commands such as km.left() would have returned the state of the button. If you’re able to communicate with the device, then the speed is your current speed.

Examples

Setting the Baud Rate to Max

Input:

km.baud(3000000)

Output: (None)

Setting the Baud Rate to Default

Input:

km.baud(115200)

Output: (None)