Beagle Bone Black Motor control

Can I control a motor using the same circuit setups as with the arduino [I plan on using a 24V dc motor and a 22.3V Li - ion battery

example →

I assume so because all I need to control the DC motor using the h-bridge is a PWM signal, and the BBB has 8 of those. If I am wrong, could somebody please point me in the right direction or maybe give me a step by step guide of how to control motors using the BBB using Debian.
Also, are there any protective measures I should take (involving the circuitry) to protect my BBB other than what is shown in the pic.\

Thanks ahead of time!


the new Moto Cape from Circuitco (available first week of July) is based on the Arduino Moto Shield with the L298 ( the schematic and design files for both the Moto Shield and Moto Cape are released under open source Creative Commons license are available as a reference:

feel free to use it as an example implementation, or wait until the Moto Cape is available at