# Pololu dual tb9051ftg braking function

**URL:** https://forum.pololu.com/t/pololu-dual-tb9051ftg-braking-function/27541
**Category:** Motor controllers/drivers and motors
**Created:** [February 24, 2025, 5:05am UTC](https://forum.pololu.com/t/pololu-dual-tb9051ftg-braking-function/27541 "2025-02-24T05:05:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![weij1999](https://forum.pololu.com/letter_avatar_proxy/v4/letter/w/ee7513/32.png) [@weij1999](https://forum.pololu.com/u/weij1999)
#### Post date: [February 24, 2025, 5:05am UTC](https://forum.pololu.com/t/pololu-dual-tb9051ftg-braking-function/27541/1 "2025-02-24T05:05:00Z")

</div>

I am using the pololu dual tb9051ftg motor shield on Arduino UNO. I am also using the shield library. The library has the setspeed function where I think if I set speed at 0, it is doing coasting. Does it have capability to do braking (like the setBrakes function in dualvnh5019)? if yes, how do change the library code to make it work?

thanks.

---

<div class="post-metadata">

### Author: ![PatrickM](https://forum.pololu.com/user_avatar/forum.pololu.com/patrickm/32/7800_2.png) [@PatrickM](https://forum.pololu.com/u/PatrickM)
#### Post date: [February 25, 2025, 12:16am UTC](https://forum.pololu.com/t/pololu-dual-tb9051ftg-braking-function/27541/2 "2025-02-25T00:16:00Z")

</div>

Hello.

The `setSpeeds` method from our [Arduino library for the Pololu Dual TB9051FTG Motor Driver Shield](https://github.com/pololu/dual-tb9051ftg-motor-shield/tree/master) only changes the duty cycle delivered to the drivers’ PWM pins. It does not directly affect the drive/coast behavior. If the driver is enabled and you set the speed to zero, it will brake. If you disable the drivers, it will coast. To disable the drivers (using the EN and ENB pins) you can use the `disableDrivers` method.

- Patrick

---

<div class="post-metadata">

### Author: ![weij1999](https://forum.pololu.com/letter_avatar_proxy/v4/letter/w/ee7513/32.png) [@weij1999](https://forum.pololu.com/u/weij1999)
#### Post date: [February 26, 2025, 4:51am UTC](https://forum.pololu.com/t/pololu-dual-tb9051ftg-braking-function/27541/3 "2025-02-26T04:51:06Z")

</div>

Thank you very much for your reply. This is clear now.
