dc- motor ultracapacitive skateboard

Need help in this project as I am abit lost with the programming of my project. My skateboard will be able to charge by manual moving and then discharge to electrically move the skateboard when needed. Im using an arduino board and I need to program a H-bridge with pwm and controlling the motor speed. Hope somebody can help me out asap. Thanks!!