Construct a circuit and write some code that causes a DC motor to slowly increase in speed from a stop to full speed and then slowly decrease in speed back down to a stop.